Lint.jl
Lint.jl copied to clipboard
Unable to run `Pkg.add("Lint")`
Good afternoon. I'm trying to install the linter package by running:
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.1 (2018-09-29)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg
But when I run the following command, I get an Unsatisfiable requirements
error (complete stacktrace attached)
julia> Pkg.add("Lint")
Stacktrace.txt
I'm following the installation guide here, and am running Julia 1.0 on a Mac OS X, Version 10.13.6 if that helps at all. Thanks in advance!
The Unsatisfiable requirements
message is due to changes in the general package registry to prevent Pkg in Julia 1.0 from installing packages that are incompatible with Julia 1.0
In other words: Lint.jl does not support Julia 1.0, as the comments in #252 indicate.
The latest commit as of this comment, #256, supposedly fixes #252 and brings support for 1.0, but with Julia 1.0,
julia> Pkg.add("Lint")
still results in
Unsatisfiable requirements detected for package Lint
(stacktrace)
So it looks to me like this is still an issue
If I got it right, the package was fixed to be 1.0 compatible, but it was not released yet, since the way packages are released now has been changed, and the people that are maintaining this package don't know how to do it. Unfortunately i don't know either. You can add an unregistered package, I have not tried this, but it may work. Look for the section "Adding unregistered packages" https://docs.julialang.org/en/v1.0/stdlib/Pkg/
If you fork this package you can install it
pkg> add https://github.com/m-wells/Lint.jl
I encountered this same issue with SkyCoords.jl and I discuss the fix there. The Compat.toml
file on the JuliaRegistries needs to be updated. A trivial push to Lint.jl
should trigger a METADATA
sync and update the Registry.
@m-wells I don't think a simple push will do it here because attobot isn't installed. It would be easiest if attobot could be enabled. The alternative is to use PkgDev
but it isn't 1.0 compatible yet, though maybe you could just run it from 0.6? As for manually creating a pull request, the README for the METADATA.jl repo states: "METADATA.jl should not be edited directly unless absolutely necessary in an emergency."
In any case, a release needs to be created. If attobot is connected, then it will automatically update the registry.
@TotalVerb is there a reason we can't just add attobot?
I'd love to add attobot, but I'm not an admin in this repo. We can maybe fork it to a standard "Julia$Org" for some value of Org, and install attobot there. Any suggestions?
Looks like @tonyhffong hasn't been active here for a while. It would be ideal to fork to an Org. Looking at the list of github orgs, it seems that Julia Editor Support is the closest match -- but not a great match. It really belongs with other code analysis/testing tools (debugger, unit testing, etc). Maybe someone should create an org for that...
Also, if we fork, how can we transfer the Lint.jl
name in the official registry from this repo to the new one?
In the meantime, do you want to try running PkgDev
from 0.6 to submit to the registry? Or do you need admin privileges to cut a release?
I believe you must make a METADATA.jl PR by hand to change the name, though I have not ever done this. I think we should do this instead of trying to run PkgDev
; I don't have an installation of 0.6 handy to do this manually.
You can just download the 0.6 binaries. Then extract and run the executable in the bin
dir. It's completely standalone (doesn't require any system installation) and won't affect your current install.
I've done PRs to metadata by hand before and it's not that difficult. That being said, the easiest thing would probably be to just download the 0.6 binaries and use PkgDev to tag a new version.
Here's my recollection for how to tag a new version by hand:
- create a new annotated git tag in the Lint repository with the version number you want to release, and push it to Lint.jl on github
- Go to ~/.julia/v0.6/METADATA/ and pull the most recent version from the official repository
- in ~/.julia/v0.6/METADATA/Lint/versions add a new folder with the release number (no v at the beginning)
- in that release folder, copy the REQUIRE file from the tagged version of Lint to a file named "require"
- make a new file in the release folder, called "sha1", with the sha1 for the commit that is the release
- add and commit the changes
- push the changes to your own fork of METADATA, and then open a PR
If you want to change the URL of the repository, i.e. you want to host it at a new org, change the url of ~/.julia/v0.6/METADATA/Lint/url. It would probably be best to make it a separate PR, and explain the reasoning for changing ownership of the repository.
edit: I just realized that If you don't have v0.6 installed, you will not have the the folders I described above. In that case, just clone METADATA some place else and do the same things.
@TotalVerb do you want to try the PkgDev
method using 0.6 binaries?
Also, with the new debugger, I noticed there's a new org: JuliaDebug. Not quite a perfect fit, since it's just repos for the debugger, but could be a potential new home.
Pinging @vchuravy, do you think JuliaDebug could host this? Or maybe do you feel like somewhere else is more appropriate?
@tobanw I'll try the PkgDev
+ 0.6bin method. Will report in this thread.
@TotalVerb I'll need a new tag pushed to this repo to continue. Can't push it myself.
May I suggest v0.6.0
?
@FelipeLema done just now.
I took the liberty of making explicit that we support julia 1.0 onwards (not 0.6) in https://github.com/JuliaLang/METADATA.jl/pull/22873/commits/1a036ae7cfa1bf8eb265c0280c4a72ff97f03225
I'd say that supporting previous versions would be a separate feature.
I dont see 0.6.0 in https://github.com/JuliaRegistries/General/blob/master/L/Lint/Versions.toml
we're waiting on https://github.com/JuliaLang/METADATA.jl/pull/22873 to be accepted.
Feel free to comment there or to give it a thumbs up for maintainers to pick it up.
I was just pointed out that we're supposed to use registration bot
Any update on this? I am on Julia 1.1 and get the same error.
While not really a solution, my workaround is to have a custom project (FooBar) and do
install.julia.jl
(effectively the travis glue not yet merged at https://github.com/travis-ci/travis-build/pull/1571):
if VERSION < v"0.7.0-DEV.5183"
Pkg.clone(pwd(), ENV["JL_PKG"])
Pkg.build(ENV["JL_PKG"])
else
using Pkg
Pkg.build()
end
install.julia.sh
julia -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/tonyhffong/Lint.jl", rev="v0.6.0"))'
export JL_PKG=FooBar
julia --color=yes install.julia.jl
julia -e 'import Lint.lintfile'
I'm still having a little bit of a problem. When I run
pkg> add https://github.com/tonyhffong/Lint.jl/
Lint v0.5.2+ #master
is installed. This appears not to be version 0.6.0, and I can't get it to work with linter-julia. Is this an experience other people are having? Or am I just misinterpreting 0.5.2+?
@CalebUsadi Try this:
(v1.0) pkg> add Lint#v0.6.0
@logankilpatrick
No changes! Is there a way to verify that perhaps the package itself is 0.6.0?
I tried and that should work! You may need to do rn Lint
in the package manager.
And yes you can verify by looking at the repo and checking the most recent tagged release, which is 0.6.0.
For some reason I'm still ending up with Lint v0.5.2+. Not sure why, or how to resolve it. Did you mean rm Lint
?
Yes sorry.
If doing rm and then add Lint#0.6.0
Doesn’t fix it, then maybe the version is being required by one of the other packages you are using.