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

Engine: generalize names.rs into a crate #428

Merged
merged 6 commits into from
Jan 15, 2024
Merged

Engine: generalize names.rs into a crate #428

merged 6 commits into from
Jan 15, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Jan 11, 2024

This PR gets rid of names.rs and generate.sh in favor of the crate engine/names.
I replaced generate.sh (which was a bit of an acrobatic bash script) with the Rust binary engine/names/extract which ensures type safety.

This PR fixes the issues #410 and #363.

I added a bit of documentation on how the purpose and on how to use engine/names as well.

@W95Psp W95Psp force-pushed the generalize-names-rs branch 2 times, most recently from 99cfc34 to 8dd350b Compare January 11, 2024 15:50
@W95Psp
Copy link
Collaborator Author

W95Psp commented Jan 11, 2024

CI is finally green, after hours of debugging 🥳

Copy link
Contributor

@jschneider-bensch jschneider-bensch left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks! 👍

engine/names/README.md Outdated Show resolved Hide resolved
engine/names/README.md Outdated Show resolved Hide resolved
engine/names/README.md Outdated Show resolved Hide resolved
@W95Psp W95Psp force-pushed the generalize-names-rs branch from e1713bd to 44381fe Compare January 15, 2024 10:54
@W95Psp W95Psp force-pushed the generalize-names-rs branch from 44381fe to c65f9b8 Compare January 15, 2024 10:55
@W95Psp W95Psp enabled auto-merge January 15, 2024 10:56
@W95Psp W95Psp added this pull request to the merge queue Jan 15, 2024
Merged via the queue into main with commit f57c322 Jan 15, 2024
9 checks passed
@W95Psp W95Psp deleted the generalize-names-rs branch January 15, 2024 11:40
W95Psp added a commit that referenced this pull request Jan 16, 2024
PR #428 added a heavy dependency to `hax-engine`, dependency that is
expected to be built locally when developing on hax.
W95Psp added a commit that referenced this pull request Apr 24, 2024
This commit fixes the test harness: since
#428, the test harness silently
assumes hax is in PATH while building the crate
`hax-engine-names-extract`.

This crate `hax-engine-names-extract` is used at build time by the
engine to list and import the Rust names we rely on.

`hax-engine-names-extract` itself requires the Rust part of hax at
build time.

This PR fixes the test harness so that:
 1. it asks cargo to build `cargo-hax` and the driver
 2. it looks for the path of `cargo-hax` & driver just built (somewhere local in `target/bin/something/someting`), injects thoses paths as env vars in a `cargo build --bin hax-engine-names-extract`;
 3. it compiles the engine with the three paths mentioned above (which are required by the engine at compile time);
 4. it runs full hax (frontend + engine) on the actual tests;
 5. compare with snapshots.
W95Psp added a commit that referenced this pull request Apr 25, 2024
This commit fixes the test harness: since
#428, the test harness silently
assumes hax is in PATH while building the crate
`hax-engine-names-extract`.

This crate `hax-engine-names-extract` is used at build time by the
engine to list and import the Rust names we rely on.

`hax-engine-names-extract` itself requires the Rust part of hax at
build time.

This PR fixes the test harness so that:
 1. it asks cargo to build `cargo-hax` and the driver
 2. it looks for the path of `cargo-hax` & driver just built (somewhere local in `target/bin/something/someting`), injects thoses paths as env vars in a `cargo build --bin hax-engine-names-extract`;
 3. it compiles the engine with the three paths mentioned above (which are required by the engine at compile time);
 4. it runs full hax (frontend + engine) on the actual tests;
 5. compare with snapshots.
W95Psp added a commit that referenced this pull request Apr 25, 2024
This commit fixes the test harness: since
#428, the test harness silently
assumes hax is in PATH while building the crate
`hax-engine-names-extract`.

This crate `hax-engine-names-extract` is used at build time by the
engine to list and import the Rust names we rely on.

`hax-engine-names-extract` itself requires the Rust part of hax at
build time.

This PR fixes the test harness so that:
 1. it asks cargo to build `cargo-hax` and the driver
 2. it looks for the path of `cargo-hax` & driver just built (somewhere local in `target/bin/something/someting`), injects thoses paths as env vars in a `cargo build --bin hax-engine-names-extract`;
 3. it compiles the engine with the three paths mentioned above (which are required by the engine at compile time);
 4. it runs full hax (frontend + engine) on the actual tests;
 5. compare with snapshots.
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