Skip to content

Commit

Permalink
fix breakage in 1.4 rc2 (JuliaLang#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Feb 28, 2020
1 parent 68530ef commit 417444a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "PackageCompiler"
uuid = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
version = "1.0.1"
version = "1.0.2"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
11 changes: 9 additions & 2 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ function load_all_deps(ctx)
end
return pkgs
end
function source_path(ctx, pkg)
if VERSION <= v"1.4.0-rc1"
Pkg.Operations.source_path(pkg)
else
Pkg.Operations.source_path(ctx, pkg)
end
end

function bitflag()
if Sys.ARCH == :i686
Expand Down Expand Up @@ -510,7 +517,7 @@ function audit_app(ctx::Pkg.Types.Context)
end
pkgs = load_all_deps(ctx)
for pkg in pkgs
pkg_source = Pkg.Operations.source_path(pkg)
pkg_source = source_path(ctx, pkg)
pkg_source === nothing && continue
if isfile(joinpath(pkg_source, "deps", "build.jl"))
@warn "Package $(pkg.name) has a build script, this might indicate that it is not relocatable"
Expand Down Expand Up @@ -682,7 +689,7 @@ function bundle_artifacts(ctx, app_dir)
# Collect all artifacts needed for the project
artifact_paths = String[]
for pkg in pkgs
pkg_source_path = Pkg.Operations.source_path(pkg)
pkg_source_path = source_path(ctx, pkg)
pkg_source_path === nothing && continue
# Check to see if this package has an (Julia)Artifacts.toml
for f in Pkg.Artifacts.artifact_names
Expand Down

0 comments on commit 417444a

Please sign in to comment.