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

Fix Pkg command for install pacakge from git #4

Merged
merged 2 commits into from
Mar 9, 2019

Conversation

nmoran
Copy link
Contributor

@nmoran nmoran commented Feb 27, 2019

In original README.md, the command used to install from git is Pkg.add, but should be Pkg.clone.

In original README.md, the command used to install from git is `Pkg.add`, but should be `Pkg.clone`.
@fercarozzi
Copy link
Contributor

Thanks for the contribution, but the tutorial is intended for general users, not developers. That is, users that would access the application as is. In addition, if the user is cloning the application for development, it should be Pkg.dev.

@fercarozzi fercarozzi closed this Feb 28, 2019
@nmoran
Copy link
Contributor Author

nmoran commented Feb 28, 2019

Thanks for reviewing my PR, but I was talking about this from a users perspective and not a developers perspective. The instructions in the README as they are now don't work on OSX (with either julia 0.7 or 1.0.3). Entering Pkg.add("https://github.com/SeismicJulia/SeisMain.jl.git") gives

ERROR: https://github.com/SeismicJulia/SeisMain.jl.git is not a valid packagename
Stacktrace:
 [1] pkgerror(::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:120
 [2] check_package_name(::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:22
 [3] iterate at ./generator.jl:47 [inlined]
 [4] collect(::Base.Generator{Array{String,1},typeof(Pkg.API.check_package_name)}) at ./array.jl:619
 [5] #add_or_develop#11 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:28 [inlined]
 [6] #add_or_develop at ./none:0 [inlined]
 [7] #add_or_develop#10 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:27 [inlined]
 [8] #add_or_develop at ./none:0 [inlined]
 [9] #add#18 at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69 [inlined]
 [10] add(::String) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:69
 [11] top-level scope at none:0

Using clone works and allows the package to be imported. From the documentation, seems a better way would be to add as a PackageSpec as

Pkg.add(PackageSpec(url="https://github.com/SeismicJulia/SeisMain.jl.git"))

@fercarozzi
Copy link
Contributor

Pkg.add(PackageSpec(url="https://github.com/SeismicJulia/SeisMain.jl.git"))
is the correct way to go. "Pkg.add" alone would not work, you are right. I invite you to change your PR in this sense if you are interested to do so.
Again, thanks for your contribution.

@fercarozzi fercarozzi reopened this Feb 28, 2019
@nmoran
Copy link
Contributor Author

nmoran commented Feb 28, 2019

Thanks, made a followup commit which changes this to use PackageSpec.

@msacchi msacchi merged commit 07cc846 into SeismicJulia:master Mar 9, 2019
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.

3 participants