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

Rename system library files from library_foo.js to libfoo.js #23348

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 9, 2025

At the same time move all the libraries file into a separate lib/src directory. This helps to distinguish library files from other files in the lib directory, which was very overcrowed.

These files were also includable via -lfoo and we had a special case for system libraries where library_foo.js could be used in addition to libfoo.js. This change removes to special case.

This only file that was not renamed using the simple pattern was library.py itself which becomes libcore.py. I also considered libemscripten.js.

To some this may seem like needless churn but for years now I've been wanting to cleanup the src directory. I think have files logically separated into directories helps a lot with understanding the project structure.

As a followup I am also considering moving all the runtime files into src/include (since these are all files that get #included into the generated code directly. That would leave the src directory containing only the JS compiler code itself which I think is another important distinction.

At the same time move all the libraries file into a separate `lib/src`
directory.  This helps to distinguish library files from other files
in the `lib` directory, which was very overcrowed.

These files were also includable via `-lfoo` and we had a special case
for system libraries where `library_foo.js` could be used in addition to
`libfoo.js`.  This change removes to special case.

This only file that was not renamed using the simple pattern was
`library.py` itself which becomes `libcore.py`.  I also considered
`libemscripten.js`.

To some this may seem like needless churn but for years now I've been
wanting to cleanup the `src` directory.  I think have files logically
separated into directories helps a lot with understanding the project
structure.

As a followup I am also considering moving all the runtime files into
`src/include` (since these are all files that get `#included` into the
generated code directly.  That would leave the `src` directory
containing only the JS compiler code itself which I think is another
important distinction.
@sbc100 sbc100 marked this pull request as draft January 9, 2025 04:04
@sbc100
Copy link
Collaborator Author

sbc100 commented Jan 9, 2025

Marking as draft for now.

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.

1 participant