Skip to content

Only run lalrpop generation on ubuntu-latest #4132

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

Closed
wants to merge 7 commits into from

Conversation

coolreader18
Copy link
Member

Unless I'm misunderstanding something in the gh actions config, running lalrpop on windows and linux doesn't actually do anything - the cache key doesn't have the os in it, so it'll just overwrite each other and it's doing more work than it needs to.

@fanninpm fanninpm requested a review from youknowone August 23, 2022 21:41
@youknowone
Copy link
Member

I wish if it were true. Mysteriously, they generate different file hash. Check hash values from any other builds: https://github.com/RustPython/RustPython/runs/7983393352?check_suite_focus=true
You will find this version of CI fails if you change python.lalrpop.

@coolreader18
Copy link
Member Author

crlf vs lf issue (hopefully) :)

@coolreader18
Copy link
Member Author

Well that's strange....

windows:
Cache not found for input keys: lalrpop-299a3f1010a7175d7b8df916d49cbc7d2121b53be5ae36fbd6a90aac9a15a97f

ubuntu
Cache restored from key: lalrpop-299a3f1010a7175d7b8df916d49cbc7d2121b53be5ae36fbd6a90aac9a15a97f

@coolreader18
Copy link
Member Author

ohohoho, it was that AND actions/cache#888. updated to actions/cache@v3 to fix it.

@coolreader18
Copy link
Member Author

coolreader18 commented Aug 25, 2022

I give up, I think it's easier to cache the lalrpop binary for each platform.

@coolreader18 coolreader18 force-pushed the no-double-lalrpop branch 2 times, most recently from 037c541 to 4621331 Compare August 25, 2022 02:17
@coolreader18
Copy link
Member Author

Okay, looks like it doesn't actually cache it yet but I'm okay with this for now - I've requested lalrpop be added to cargo-quickinstall's binary package cache so in the future we can use that.

@coolreader18
Copy link
Member Author

coolreader18 commented Aug 25, 2022

I know I've not been around for a couple months, but I really do still think that just checking the generated file into the repository is the easiest way to do this - it cuts down on compile times for everyone, and it just works for first-time contributors (and ci, hahahaaa): no having to remember to pass the correct feature, or install an external tool. Just cargo build and you have an interpreter.

@coolreader18
Copy link
Member Author

(ok now it does really cache the binary in the gh actions cache)

@coolreader18 coolreader18 force-pushed the no-double-lalrpop branch 3 times, most recently from 11e2f52 to ad6a1c8 Compare August 25, 2022 05:38
@youknowone
Copy link
Member

youknowone commented Aug 25, 2022

previously, lalrpop job was only checking hash if the hash didn't change and used cached crate install for lalrpop even when lalrpop is required(baptiste0928/cargo-install@v1 does it - the reason CI was still using command instead of feature). Check the previous CI results. running cost for lalrpop was very low unless lalrpop was actually required. If you care about CI cost, this changed version increases the CI cost. The CI cost was almost same as before without this change.

no having to remember to pass the correct feature, or install an external tool

#4129 also do it. please check it.

@youknowone
Copy link
Member

Oh, I found you made your own cache of lalrpop binary.

@youknowone
Copy link
Member

optional lalrpop feature of parser revealed not working well. going back to this way would be better

@DimitrisJim
Copy link
Member

Is this issue relevant now that Parser lives in a separate repo? (Should it be moved there?)

@youknowone
Copy link
Member

The generated parser is bundled again in the new repository

@youknowone youknowone closed this May 19, 2023
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.

3 participants