Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge NAPI wrapper types into same file as Rust types #570

Closed
AntonyBlakey opened this issue Aug 19, 2023 · 0 comments · Fixed by #1120
Closed

Merge NAPI wrapper types into same file as Rust types #570

AntonyBlakey opened this issue Aug 19, 2023 · 0 comments · Fixed by #1120
Assignees

Comments

@AntonyBlakey
Copy link
Contributor

AntonyBlakey commented Aug 19, 2023

I suggest keeping every type/API in a single place. This makes it much easier to maintain or edit together, instead of editing one version and spending the time to look for others, possibly missing them. This way, all types/APIs can evolve together, and we don't have to maintain separate hierarchies.

So instead of this:

  • src/parse_error.rs shared + rust stuff
  • src/visitor.rs shared + rust stuff
  • src/napi/parse_error.rs napi stuff
  • src/napi/visitor.rs napi stuff

I suggest this:

  • src/parse_error/mod.rs shared stuff
  • src/parse_error/rust.rs rust stuff
  • src/parse_error/napi.rs napi stuff
  • src/visitor/mod.rs shared stuff
  • src/visitor/rust.rs rust stuff
  • src/visitor/napi.rs napi stuff

This way, they can also follow (roughly) the same structure as the public API. For example, if I'm adding a new method to Cursor, it is really easy to miss its NAPI counterpart if it is not within the same module/folder. This is a trivial example, but there are more complicated scenarios.

The more atomic/holistic each type/module can be, the easier it is to update/revision accurately.

Originally posted by @OmarTawfik in #564 (comment)

@Xanewok Xanewok removed this from Slang - 2023 Q3 Nov 2, 2023
@Xanewok Xanewok self-assigned this Nov 8, 2023
@AntonyBlakey AntonyBlakey assigned Xanewok and unassigned Xanewok Nov 8, 2023
@OmarTawfik OmarTawfik self-assigned this Feb 13, 2024
@OmarTawfik OmarTawfik moved this to Todo in Slang - 2024 H1 Feb 13, 2024
@AntonyBlakey AntonyBlakey removed their assignment Feb 15, 2024
@Xanewok Xanewok removed their assignment Feb 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 8, 2024
See the added changesets for the specific API changes/additions.

Additionally, this PR:

- deprecates/removes NAPI build/pipeline.
- adds `jco` as a sub-module to the repo.
- deletes the platform-specific packages, as we now just need one.

Closes #410
Closes #570
Closes #573
Closes #816
Closes #987
@github-project-automation github-project-automation bot moved this from ⏳ Todo to ✅ Done in Slang - 2024 H2 Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants