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

Failed to precompile using Julia 1.10-rc1 #2991

Closed
PhyX-Meow opened this issue Nov 5, 2023 · 3 comments · Fixed by #2994
Closed

Failed to precompile using Julia 1.10-rc1 #2991

PhyX-Meow opened this issue Nov 5, 2023 · 3 comments · Fixed by #2994
Labels
bug Something isn't working

Comments

@PhyX-Meow
Copy link

PhyX-Meow commented Nov 5, 2023

Julia version: v1.10-rc1
Oscar version: master

In [3]: using Oscar
Precompiling Oscar
        Info Given Oscar was explicitly requested, output will be shown live
fatal: not a git repository (or any of the parent directories):.git
ERROR: LoadError: failed process: Process(`git -C /home/wuli/.julia/packages/Oscar/Bv8CE log -n 1 --pretty=format:%H`, ProcessExited(128)) [128]

Stacktrace:
  [1] pipeline_error
    @ Base ./process.jl:565 [inlined]
  [2] read(cmd::Cmd)
    @ Base ./process.jl:449
  [3] read
    @ Base ./process.jl:458 [inlined]
  [4] readchomp
    @ Base ./io.jl:974 [inlined]
  [5] serialization_version_info()
    @ Oscar ~/.julia/packages/Oscar/Bv8CE/src/Serialization/main.jl:169
  [6] top-level scope
    @ ~/.julia/packages/Oscar/Bv8CE/src/Serialization/main.jl:181
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:489
  [8] include(x::String)
    @ Oscar ~/.julia/packages/Oscar/Bv8CE/src/Oscar.jl:20
  [9] top-level scope
    @ ~/.julia/packages/Oscar/Bv8CE/src/Oscar.jl:249
 [10] include
    @ Base ./Base.jl:489 [inlined]
 [11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2216
 [12] top-level scope
    @ stdin:3
in expression starting at /home/wuli/.julia/packages/Oscar/Bv8CE/src/Serialization/main.jl:181
in expression starting at /home/wuli/.julia/packages/Oscar/Bv8CE/src/Oscar.jl:1
in expression starting at stdin:3
  ✗ Oscar
  0 dependencies successfully precompiled in 34 seconds. 196 already precompiled.

Seem git gives an error, but I cannot understand why precompiling involve git.

@PhyX-Meow PhyX-Meow added the bug Something isn't working label Nov 5, 2023
@PhyX-Meow
Copy link
Author

PhyX-Meow commented Nov 5, 2023

OK, the problem is

commit_hash = readchomp(`git -C $path log -n 1 --pretty=format:"%H"`)

It runs git in package path where julia installed, which is not a git repo.

@thofma
Copy link
Collaborator

thofma commented Nov 5, 2023

@antonydellavecchia one more reason to maybe refactor https://github.com/oscar-system/Oscar.jl/blob/master/src/utils/versioninfo.jl#L20 and use it in the serialization.

@benlorenz
Copy link
Member

I will do a refactor of the versioninfo to allow returning just the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants