Skip to content

Commit 1da1716

Browse files
authored
Improve the error logging for the case of Julia 1.6 or 1.7 on Apple Silicon (macos-latest or macos-14) (#261)
* Add some more error logging * `npm run build` * Make the message more concise * Remove the trailing newline at the very end of the last line of the error message * `npm ci && npm run build`
1 parent 7653693 commit 1da1716

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

lib/installer.js

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/installer.ts

+30
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,36 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
205205
}
206206
}
207207
}
208+
209+
// The following block is just to provide improved log messages in the CI logs.
210+
// We specifically want to improve the case where someone is trying to install
211+
// Julia 1.6 or 1.7 on Apple Silicon (aarch64) macOS.
212+
{
213+
const one_fileext_is_targz = (fileExt1 == "tar.gz") || (fileExt2 == "tar.gz");
214+
const one_fileext_is_dmg = (fileExt1 == "dmg") || (fileExt2 == "dmg");
215+
const one_fileext_is_targz_and_other_is_dmg = one_fileext_is_targz && one_fileext_is_dmg;
216+
217+
// We say that "this Julia version does NOT have native binaries for Apple Silicon"
218+
// if and only if "this Julia version is < 1.8.0"
219+
const this_julia_version_does_NOT_have_native_binaries_for_apple_silicon = semver.lt(
220+
version,
221+
'1.8.0',
222+
);
223+
const this_is_macos = osPlat == 'darwin';
224+
if (this_is_macos && one_fileext_is_targz_and_other_is_dmg && this_julia_version_does_NOT_have_native_binaries_for_apple_silicon) {
225+
const msg = `It looks like you are trying to install Julia 1.6 or 1.7 on ` +
226+
`the "macos-latest" runners.\n` +
227+
`"macos-latest" now resolves to "macos-14", which run on Apple ` +
228+
`Silicon (aarch64) macOS machines.\n` +
229+
`Unfortunately, Julia 1.6 and 1.7 do not have native binaries ` +
230+
`available for Apple Silicon macOS.\n` +
231+
`Therefore, it is not possible to install Julia with the current ` +
232+
`constraints.\n` +
233+
`For instructions on how to fix this error, please see the following Discourse post: ` +
234+
`https://discourse.julialang.org/t/how-to-fix-github-actions-ci-failures-with-julia-1-6-or-1-7-on-macos-latest-and-macos-14/117019`
235+
core.error(msg);
236+
}
237+
}
208238
}
209239

210240
core.error(`Encountered error: ${err}`)

0 commit comments

Comments
 (0)