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 isgenerated on nightly #86

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

CarloLucibello
Copy link
Member

@CarloLucibello CarloLucibello commented May 15, 2021

isgenerated was renamed to hasgenerator in JuliaLang/julia#40745

@@ -2,6 +2,12 @@ using Core: CodeInfo, Typeof
using Core.Compiler: InferenceState, MethodInstance, svec
using InteractiveUtils: typesof

if isdefined(Base, :hasgenerator) # VERSION >= v"1.7.0"
Copy link
Member

Choose a reason for hiding this comment

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

Use the version check already defined later instead, the symbols can exist together with different meanings
You also don't want to shadow base functions when the if condition later can satisfy the usage anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Note that the check like this will not work for dev versions of 1.7. You can use contrib/commit-name.sh in the Julia repo to get the exact version number for a given PR. That said, the solution here also seems fairly reasonable to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to run the commit-name.sh script but I get the following error (sorry for the italian)

carlo@prestige julia]$ contrib/commit-name.sh 1bb560ba1cf83eab8a4eb0315a60142a0dc95382
fatal: il percorso 'VERSION' esiste su disco, ma non in '1bb560ba1cf83eab8a4eb0315a60142a0dc95382'
contrib/commit-name.sh: riga 13: [: troppi argomenti
fatal: bad object 1bb560ba1cf83eab8a4eb0315a60142a0dc95382
fatal: bad object 1bb560ba1cf83eab8a4eb0315a60142a0dc95382
contrib/commit-name.sh: riga 27: [: =: atteso operatore unario
contrib/commit-name.sh: riga 30: [: =: atteso operatore unario

Can we keep the isdefined since it doesn't make much difference? Also, I don't see any overshadowing problem, hasgenerator is not exported from Base, and since we use it in a couple of spots I prefer to do the isdefined check once instead of multiple times

Copy link
Member

Choose a reason for hiding this comment

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

You need to use the commit that was actually merged into master:

~/.../Julia/julia >>> ./contrib/commit-name.sh 2688a06
1.7.0-DEV.1096

But yeah, it's not really necessary here...

Copy link
Member

Choose a reason for hiding this comment

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

You could use the images that are built by the julia build bots for the PR too.

I think the necessary version checks VERSION >. ... are already in place?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand

Copy link
Member

Choose a reason for hiding this comment

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

Julia's build bots build the images for every pr, so we could potentially use those is what I meant.

Copy link
Member

Choose a reason for hiding this comment

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

Why not just use the nightly build? Or is that what you mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

can we stop discussing an issue that doesn't really exist and merge this? I'd like to have CI back on nightly

@CarloLucibello
Copy link
Member Author

@DhairyaLGandhi merge and tag?

@CarloLucibello
Copy link
Member Author

@DhairyaLGandhi bump

@CarloLucibello
Copy link
Member Author

@DhairyaLGandhi can we merge this?

@DhairyaLGandhi
Copy link
Member

See #88

@CarloLucibello
Copy link
Member Author

see what?

@DhairyaLGandhi
Copy link
Member

I got ci to trigger on nightly, so we at least have working tests

@DhairyaLGandhi DhairyaLGandhi merged commit b4ae8ea into FluxML:master Jun 7, 2021
@CarloLucibello
Copy link
Member Author

needs a tag, then Zygote & co. tests will hopefully be passing again

@DhairyaLGandhi
Copy link
Member

Doc test failures are real.

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