Skip to content

Conversation

@IanButterworth
Copy link
Member

I think this might be happening quite a bit in the wild.

i.e. JuliaLang/julia#55878

@IanButterworth IanButterworth requested a review from a team as a code owner November 18, 2024 03:45
@IanButterworth
Copy link
Member Author

I say in the wild... but it's the case on this CI... 😂

Screenshot 2024-11-17 at 10 51 31 PM

DilumAluthge
DilumAluthge previously approved these changes Nov 18, 2024
DilumAluthge
DilumAluthge previously approved these changes Nov 18, 2024
@IanButterworth IanButterworth merged commit c861e46 into master Nov 18, 2024
70 checks passed
@IanButterworth IanButterworth deleted the ib/warn_x64_macos branch November 18, 2024 04:41
throw new Error(`Arch input must not be null`);
}
if (originalArchInput == 'x64' && os.platform() == 'darwin' && os.arch() == 'arm64') {
core.warning('[setup-julia] x64 arch has been requested on a macOS runner that has an arm64 (Apple Silicon) architecture. You may have meant to use the "aarch64" arch instead (or left it unspecified for the correct default).');
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems misleading, since leaving it unspecified causes it to throw an exception and fail:

if (!originalArchInput) { // if `originalArchInput` is an empty string
throw new Error(`Arch input must not be null`)
}

https://github.com/vtjnash/Glob.jl/actions/runs/11898442357/job/33154951261?pr=44

Copy link
Member Author

Choose a reason for hiding this comment

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

Unspecified as in not an empty string, just not set at all.

Copy link
Member

@DilumAluthge DilumAluthge Nov 18, 2024

Choose a reason for hiding this comment

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

If you do this:

- uses: julia-actions/setup-julia@desiredtag
  with:
    version: '1.10'

Then setup-julia will default to the architecture of the runner.


In contrast, if you do this:

- uses: julia-actions/setup-julia@desiredtag
  with:
    version: '1.10'
    arch: ''

Then setup-julia will (correctly) throw an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you use a matrix and don't specify arch, then it will get an empty string here

Copy link
Member

Choose a reason for hiding this comment

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

The following two are equivalent:

- uses: julia-actions/setup-julia@desiredtag
  with:
    version: '1.10'
- uses: julia-actions/setup-julia@desiredtag
  with:
    version: '1.10'
    arch: 'default'

Copy link
Contributor

Choose a reason for hiding this comment

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

The documentation says it defaults to '', though I agree that using "default" instead works

setup-julia/README.md

Lines 56 to 57 in 5c9647d

# Defaults to the architecture of the runner executing the job.
arch: ''

Copy link
Member

Choose a reason for hiding this comment

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

If you use a matrix, you shouldn't be passing an empty string ''. You should pass 'default' instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the readme is misleading. They're all like that, note the default behaviors are written above the empty string examples. Not sure what the clearest way to write them all is.

Copy link
Member

Choose a reason for hiding this comment

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

We should fix up the README. For inputs that are optional (like arch), we should put a reasonable default in there.

Copy link
Member

Choose a reason for hiding this comment

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

ChrisRackauckas added a commit to SciML/LinearSolve.jl that referenced this pull request Oct 3, 2025
Tries to safeguard julia-actions/setup-julia#300 JuliaLang/julia#55878 where the user has requested an incorrect architecture and thus we may believe we can load MKL until we check `MKL_jll.is_available() == false`. The reason is because we're being lied to about `@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686` which then makes it take this branch and then MKL does not exist. We could instead check `isapple` another type of workaround here and 99% of users would be perfectly fine, but if this is safe this is slightly better for the 1 remaining Intel Apple user that exists in the wild somewhere.
ChrisRackauckas added a commit to ChrisRackauckas/Manifolds.jl that referenced this pull request Oct 3, 2025
MacOS ARM does not have x86 so you're doing bad things here JuliaLang/julia#55878 and julia-actions/setup-julia#300
kellertuer pushed a commit to JuliaManifolds/Manifolds.jl that referenced this pull request Oct 3, 2025
ChrisRackauckas added a commit to SciML/LinearSolve.jl that referenced this pull request Oct 3, 2025
* Better safeguard on unloadable MKL

Tries to safeguard julia-actions/setup-julia#300 JuliaLang/julia#55878 where the user has requested an incorrect architecture and thus we may believe we can load MKL until we check `MKL_jll.is_available() == false`. The reason is because we're being lied to about `@static if Sys.ARCH === :x86_64 || Sys.ARCH === :i686` which then makes it take this branch and then MKL does not exist. We could instead check `isapple` another type of workaround here and 99% of users would be perfectly fine, but if this is safe this is slightly better for the 1 remaining Intel Apple user that exists in the wild somewhere.

* Update LinearSolve.jl
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.

4 participants