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

Use 7z.exe from Julia binary download #177

Merged
merged 2 commits into from Mar 4, 2019
Merged

Conversation

hustf
Copy link
Contributor

@hustf hustf commented Dec 2, 2018

Ref. issue #148
modified: src/AtomShell/install.jl

Use (julia)/bin/7z.exe for unpacking. This is not available in home-built Julia. If so, it looks for the latest binary download folder (assuming the installation was not made for all users).

Using home-built-Julia is a prerequisite to using > 4 cores, or due to a known bug, things like

using Logging
@edit Logging.ConsoleLogger()

modified:   src/AtomShell/install.jl
Remove superfluous 'end'
modified:   src/AtomShell/install.jl
download("https://github.com/electron/electron/releases/download/v$version/$file")
run(`7z x $file -oatom`)
rm(file)
arch = Int == Int64 ? "x64" : "ia32"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any reason you re-indented this section to 3 spaces instead of 2? Can we put it back to make comparing the diff easier?

That said, i'm not sure why the whole file has 2-space indent instead of 4... I've opened #182 to change that, and i can just merge it after your PR is merged! :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason! The 2-space indentation was not recognized by my editor, which tries too be a bit smarter than it is.

src/AtomShell/install.jl Show resolved Hide resolved
@haydenfree
Copy link

What is the status on this pull request? It would be fantastic if this issue were fixed.

@hustf
Copy link
Contributor Author

hustf commented Jan 13, 2019

Blink is very widely used among new users, so I think it's one of those packages that might put extra effort like this into "beginner"-friendliness.
Perhaps open a discussion on discourse regarding a more general solution?

@sglyon sglyon merged commit 93edf72 into JuliaGizmos:master Mar 4, 2019
tkoolen added a commit to tkoolen/Blink.jl that referenced this pull request Dec 28, 2019
Really, we shouldn't be using 7z.exe at all since it's an internal
Julia utility (see e.g. JuliaLang/julia#33687
and
JuliaLang/julia#33862 (comment)).

In Julia 1.3+, we should probably switch to the Artifacts system at some
point, as was also done in
davidanthoff/Electron.jl#49 for Electron.jl. But
right now, we need a fix for Julia 1.0.5 as well.

This rather complex logic was introduced in JuliaGizmos#177. If 7z.exe is not in `joinpath(Sys.BINDIR, Base.LIBEXECDIR` (or its equivalent on versions prior to 1.3). Note that e.g. BinDeps, which is widely used, doesn't even go to the trouble of
tkoolen added a commit to tkoolen/Blink.jl that referenced this pull request Dec 28, 2019
JuliaGizmos#177 (comment)

This commit is really just to simplify behavior and avoid another wild goose
chase in the future. It does not address recent failures on 1.0.5, which
are just because the location of the 7z.exe that's shipped with Julia
binary distributions on Windows has also changed from 1.0.4 to 1.0.5.

Really, we shouldn't be using 7z.exe at all since it's an internal Julia utility (see e.g. JuliaLang/julia#33687 and JuliaLang/julia#33862 (comment)).

This rather complex logic was introduced in
JuliaGizmos#177 for the case that 7z.exe is not in `joinpath(Sys.BINDIR, Base.LIBEXECDIR` (or its equivalent on versions prior to 1.3). Note that e.g. BinDeps, which is widely used, doesn't even go to the trouble of doing this (https://github.com/JuliaPackaging/BinDeps.jl/blob/3a871c35ef1b0f45760f48088cabd7915838b0e3/src/BinDeps.jl#L116-L120).

7z.exe should only be absent on Windows in case of a native build; it's
copied over into the build tree in the `win-extras` `make` target, which is
not a dependency of the default `make` target
(see https://github.com/JuliaLang/julia/blob/d562715a8f78627627fd0ccf3197de670efbf810/doc/build/distributing.md#windows).

The previous logic attempted to find 7z.exe in likely install locations
of binary downloads of Julia. I'm personally not convinced by the
arguments given here:
JuliaGizmos#177 (comment).

In Julia 1.3+, we should probably switch to the Artifacts system at some point, as was also done in davidanthoff/Electron.jl#49 for Electron.jl. But right now, we need a fix for Julia 1.0.5 as well.
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.

None yet

4 participants