-
Notifications
You must be signed in to change notification settings - Fork 295
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
revisit how snapshot works #348
Comments
An alternative to this could be to make |
For fall, I use a slightly more "worse as better" approach.
|
@matklad hmm, I could live with that. |
Though I think it sounds maybe harder than what I suggested =) |
@matklad but also, it seems like detecting a hash mismatch is pretty easy, so the build.rs could just look for that and error if found? |
@nikomatsakis I am not entirely sure... I think there's an important difference between other users of LALRPOP and LALRPOP bootstrapping process. For other users, we need to rebuild if the hash of For LALRPOP itself, there's an additional condition. Specifically, I think we'd love to make sure that bootstrapping has reached a fixed point: that is, if we generate code for That means, we should potentially regenrate parser if either the grammar file is changed, or the code of lalrpop itself is changed. Another thing to note is that the end users of LALRPOP don't actually need to execute LALRPOP's own build.rs script at all, because the generated code is committed to the repository. I wonder if we can add
|
I was thinking about the LALRPOP snapshot. Now that we have revisions published on crates.io, it is annoying that we have to carry about lalrpop-snap. It would be nice if we could instead rely on an older, published version of
lalrpop
. The problem with that is that if we are not careful we quickly create a chain reaching very far back. It's also annoying that end users have to build lalrpop-snap.I was considering an alternative:
build.rs
so that when the generated code needs to be rebuilt, we run thelalrpop
executable instead.cargo install
locally, using--root
to place the executable into the OUT_DIR or something like that.Thoughts?
The text was updated successfully, but these errors were encountered: