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

Folder structure to prevent export bugs #9

Merged
merged 2 commits into from Oct 8, 2022
Merged

Folder structure to prevent export bugs #9

merged 2 commits into from Oct 8, 2022

Conversation

azerum
Copy link
Contributor

@azerum azerum commented Oct 8, 2022

I've noticed that usize is not exported in noeval.ts, even though usize doesn't use eval. I guess it's a bug, because in noeval.ts you had to export every serdes other than struct and number manually, and it's easy to forget to export something.

What about using such folder structure so it's harder to miss something:

  • shared_serdes contains serdeses which can be used both in eval and noeval
  • serdes contains serdeses which use eval
  • noeval_serdes contains versions of serdeses from serdes, but without eval usage

There are 4 index files for every combination Node.js/not Node.js and eval/noeval. shared.ts contains common exports

@weisrc weisrc merged commit 9e482aa into weisrc:main Oct 8, 2022
@weisrc
Copy link
Owner

weisrc commented Oct 8, 2022

Nice, I am thinking of having everything be no-eval by default and having eval serdes under eval as #5 suggested.

@azerum
Copy link
Contributor Author

azerum commented Oct 10, 2022

Yes, I think it's good idea. Can be done like this: #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants