-
Notifications
You must be signed in to change notification settings - Fork 15
Fix #27 #54
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
Fix #27 #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove "adding strictFuncs + styleCheck:error" from this PR. It's not relevant to the issue being addressed.
Also please setup a binary cache for choosenim.
Other than that, looks fine to me.
FYI @Araq, this change will make use of choosenim
instead of the current build-from-source system.
|
Co-authored-by: alaviss <[email protected]>
I don't mind it, but it has no relevance to the objective of this PR, and can be done without the nim action change, so please split it into an another PR. |
/cc @jiro4989 please advise regarding correct usage of jiro4989/setup-nim-action regarding caching in this PR! My understanding is:
since we're using
furthermore,
the problem is this doesn't propagate through exec calls (nim calling nim); instead (in another PR), add |
Yes. And
But current I will fix this note.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but this could take an extra pair of eyes regarding correctness of caching /cc @jiro4989 @xflywind
(eg given differences with https://github.com/jiro4989/setup-nim-action#devel---latest-usage, etc)
@alaviss merge?, close?. |
@xflywind should we merge this ? worst case, we can always revert |
uses: actions/cache@v1 | ||
with: | ||
path: ~/.choosenim | ||
key: ${{ runner.os }}-choosenim-devel-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting the cache at the end seems completely useless to me, since they're only restored when this step run, which at this point everything else has already finished running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- @alaviss can you make a followup PR with your proposed change?
- and is the example in https://github.com/jiro4989/setup-nim-action#devel---latest-usage also wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried moving it at the top, it works, but also becomes kinda flaky:
https://github.com/nim-lang/fusion/runs/1640491026#step:10:51 Nim_and_C_compiler_disagree_on_target_architecture
It is faster than before even without cache. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timotheecour It is correct, but as you can see, cache come before the call to setup nim.
@juancarlospaco The cache key is wrong. It didn't factor in that:
- Multiple branches are employed
- Multiple OS architectures are employed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the cache key doesn't factor in changes in nightlies version between days, which means caching would only be performed the first time and not on subsequent updates, removing all benefits of the cache.
It's probably better to just get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiro4989 I think the snippet you use in https://github.com/jiro4989/setup-nim-action#devel---latest-usage is likely to be copy pasted and misused as demonstrated here; I think it should come with a good explanation on how to use it properly, its caveats etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I wrote it.
#27 (comment)