Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove coreSpec from ModuleSet / LinkingUnit and verifyModuleSet #5104

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

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Jan 5, 2025

The core spec is configuration, not a part of the linking unit.

One could argue that verifyModuleSet adds a little bit of safety, but IMO, it does not warrant the cost / boilerplate of copying coreSpec around everywhere.

It felt like we might want to do this, when I looked at #5101.

The core spec is configuration, not a part of the linking unit.

One could argue that `verifyModuleSet` adds a little bit of safety,
but IMO, it does not warrant the cost / boilerplate of copying
coreSpec around everywhere.
@gzm0 gzm0 requested a review from sjrd January 5, 2025 13:34
@gzm0
Copy link
Contributor Author

gzm0 commented Jan 5, 2025

I'm not 100% sure whether this is a good thing or not. I can see how having the coreSpec makes the ModuleSet more self contained. But in practice, I doubt it will ever be useful :-/

@sjrd
Copy link
Member

sjrd commented Jan 5, 2025

Makes sense. The check that is really meaningful is already here, IMO:

require(frontend.coreSpec == backend.coreSpec,
"Frontend and backend must implement the same core specification")

@sjrd sjrd merged commit a984f43 into scala-js:main Jan 5, 2025
3 checks passed
@gzm0 gzm0 deleted the no-core-spec-in-unit branch January 6, 2025 06:54
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.

2 participants