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

feat: isolate DefId: faster build times #703

Merged
merged 2 commits into from
Jun 6, 2024
Merged

feat: isolate DefId: faster build times #703

merged 2 commits into from
Jun 6, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Jun 6, 2024

The OCaml build depends on the binary hax-engine-names-extract, which, at build-time, depends on the hax frontend.
hax-engine-names-extract runs the frontend at build time on hax-engine-names, which itself used to depend on the crate hax-engine-frontend. Running hax however sets specific cfg flags, yielding recompilations.

This PR cut the dependency between hax-engine-names and hax-engine-frontend. hax-engine-names needs only three type definitions from hax-engine-frontend: this PR isolates those three types in a module, and makes hax-engine-names directly use that module, inlined.

Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 for fewer dependencies, esp. this one. But I'm not sure if it actually works.
Do we need to publish this one? I don't see it anywhere in publishing.md. But I'm not sure if you can publish a crate with a path attribute.

engine/names/extract/build.rs Show resolved Hide resolved
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the publish.md to make sure have all the crates in there that we need (and also mentions the ones we don't so that we know that didn't just forget one)?
If we don't need to publish this one, it looks good to me.

@W95Psp W95Psp enabled auto-merge June 6, 2024 11:58
@W95Psp W95Psp added this pull request to the merge queue Jun 6, 2024
Merged via the queue into main with commit 46bb5c1 Jun 6, 2024
13 checks passed
@W95Psp W95Psp deleted the faster-builds branch June 6, 2024 12:43
W95Psp added a commit that referenced this pull request Jun 12, 2024
… w/o `full`

This get rids of the `#[path]` introduced
#703 by using the disabling the new
`full` feature of `hax-frontend-exporter`.
W95Psp added a commit that referenced this pull request Jun 12, 2024
… w/o `full`

This get rids of the `#[path]` introduced
#703 by using the disabling the new
`full` feature of `hax-frontend-exporter`.
W95Psp added a commit that referenced this pull request Jun 13, 2024
… w/o `full`

This get rids of the `#[path]` introduced
#703 by using the disabling the new
`full` feature of `hax-frontend-exporter`.
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 this pull request may close these issues.

2 participants