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

Crate system implementation #99

Merged
merged 13 commits into from
Sep 14, 2021
Merged

Crate system implementation #99

merged 13 commits into from
Sep 14, 2021

Conversation

fmease
Copy link
Owner

@fmease fmease commented Aug 25, 2021

Closes #14.

Missing a lot of validation still and we do not deduplicate crates in
the list of crates to build (e.g. `core` might be built several times
and each instance would be treated as distinct crates in such a case).
"Handling" means panicking right now since we don't do error messages
right now for the crate system implementation. Better than overflowing
the stack though.
They used to be local declaration indices but in other parts of the code
we did not respect that they are local relative to the namespace not the
to current crate (since we did not adjust the code from pre-crate-system).
Now, we simply store global declaration indices in a namespace which is
way simpler. I also tried keeping the local indices but then defined an
accessor method resolving them to global indices given three more
arguments (!). It was ugly and error-prone.
@fmease fmease added A-module-system Area: Module system A-name-resolution Area: Name resolution labels Aug 25, 2021
@fmease fmease force-pushed the crate-system branch 3 times, most recently from 538f830 to b9bb789 Compare August 30, 2021 20:08
TODOS:

* better error messages when deserializing
* transfer most of the span information from the `PackageManifest`
  to the `Package`
* use the span information from `Package` for error messages
  emitted during package resolution
* create a better API for deserializing
* UI test suite (+ framework) for package resolution
* unit tests for the metadata parser
@fmease
Copy link
Owner Author

fmease commented Sep 14, 2021

Unfinished work is tracked in #100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-module-system Area: Module system A-name-resolution Area: Name resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crate system
1 participant