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

Fix #27 #54

Merged
merged 9 commits into from
Jan 3, 2021
Merged

Fix #27 #54

merged 9 commits into from
Jan 3, 2021

Conversation

juancarlospaco
Copy link
Contributor

@juancarlospaco juancarlospaco commented Dec 13, 2020

@juancarlospaco juancarlospaco changed the title wip Fix #27 Dec 13, 2020
@juancarlospaco juancarlospaco marked this pull request as ready for review December 13, 2020 23:53
Copy link
Contributor

@alaviss alaviss left a 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.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@juancarlospaco
Copy link
Contributor Author

juancarlospaco commented Dec 16, 2020

styleCheck literally found errors on the code, dont you want a more correct code... 😞

Co-authored-by: alaviss <leorize+oss@disroot.org>
@alaviss
Copy link
Contributor

alaviss commented Dec 16, 2020

styleCheck literally found errors on the code, dont you want a more correct code... 😞

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.

@timotheecour
Copy link
Member

timotheecour commented Dec 19, 2020

/cc @jiro4989 please advise regarding correct usage of jiro4989/setup-nim-action regarding caching in this PR!

My understanding is:

Please should not use Cache nimble on windows-latest. setup-nim-action may Failing to install on windows-latest.

since we're using builder: windows-2019, not windows-latest

Please remove "adding strictFuncs + styleCheck:error" from this PR. It's not relevant to the issue being addressed.

furthermore, strictFuncs still is very experimental, and it's not at all clear how they can be fixed, see nim-lang/Nim#16305 and https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3A%22view+types%22+sort%3Aupdated-desc

nimble --experimental:strictFuncs --styleCheck:error test

the problem is this doesn't propagate through exec calls (nim calling nim); instead (in another PR), add tests/config.nims with flags there; it's more flexible (thanks to nimscript) and does propagate through exec calls

@jiro4989
Copy link

@timotheecour

My understanding is:

we need also the snippet mentioned in https://github.com/jiro4989/setup-nim-action#devel---latest-usage
we can disregard this note:

Yes.

And setup-nim-action can use Cache nimble on windows-latest and windows-2019 now.
I tried those.

choosenim had returned error when nimble had been cached on windows virtual machine. (setup-nim-action is simple wrapper GitHub Actions of choosenim. )

But current choosenim has not this issues.

I will fix this note.

Please should not use Cache nimble on windows-latest. setup-nim-action may Failing to install on windows-latest.

Copy link
Member

@timotheecour timotheecour left a 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)

@juancarlospaco
Copy link
Contributor Author

@alaviss merge?, close?.

@timotheecour
Copy link
Member

@xflywind should we merge this ? worst case, we can always revert

@timotheecour timotheecour merged commit 31e69e8 into nim-lang:master Jan 3, 2021
@juancarlospaco juancarlospaco deleted the yolo branch January 3, 2021 11:06
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-devel-latest
Copy link
Contributor

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.

Copy link
Member

@timotheecour timotheecour Jan 3, 2021

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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. 🤷

Copy link
Contributor

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

Copy link
Contributor

@alaviss alaviss Jan 3, 2021

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.

Copy link
Member

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

Copy link

Choose a reason for hiding this comment

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

Thanks. I wrote it.

jiro4989/setup-nim-action@4c32cad

juancarlospaco added a commit to juancarlospaco/fusion that referenced this pull request Jan 3, 2021
timotheecour pushed a commit to timotheecour/fusion that referenced this pull request Jan 4, 2021
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.

5 participants