Lint.jl icon indicating copy to clipboard operation
Lint.jl copied to clipboard

Unable to run `Pkg.add("Lint")`

Open ricardoaiglesias opened this issue 5 years ago • 50 comments

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!

ricardoaiglesias avatar Oct 03 '18 02:10 ricardoaiglesias

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.

ikselven avatar Oct 03 '18 12:10 ikselven

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

emgrasmeder avatar Jan 11 '19 13:01 emgrasmeder

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/

gabrielpreviato avatar Jan 11 '19 13:01 gabrielpreviato

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 avatar Feb 25 '19 15:02 m-wells

@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?

tobanw avatar Mar 14 '19 00:03 tobanw

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?

TotalVerb avatar Mar 14 '19 00:03 TotalVerb

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?

tobanw avatar Mar 14 '19 03:03 tobanw

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.

TotalVerb avatar Mar 14 '19 23:03 TotalVerb

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.

tobanw avatar Mar 15 '19 13:03 tobanw

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:

  1. 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
  2. Go to ~/.julia/v0.6/METADATA/ and pull the most recent version from the official repository
  3. in ~/.julia/v0.6/METADATA/Lint/versions add a new folder with the release number (no v at the beginning)
  4. in that release folder, copy the REQUIRE file from the tagged version of Lint to a file named "require"
  5. make a new file in the release folder, called "sha1", with the sha1 for the commit that is the release
  6. add and commit the changes
  7. 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.

galenlynch avatar Mar 16 '19 12:03 galenlynch

@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.

tobanw avatar Mar 29 '19 16:03 tobanw

Pinging @vchuravy, do you think JuliaDebug could host this? Or maybe do you feel like somewhere else is more appropriate?

TotalVerb avatar Mar 29 '19 22:03 TotalVerb

@tobanw I'll try the PkgDev + 0.6bin method. Will report in this thread.

FelipeLema avatar Apr 25 '19 20:04 FelipeLema

@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 avatar Apr 25 '19 20:04 FelipeLema

@FelipeLema done just now.

TotalVerb avatar Apr 30 '19 00:04 TotalVerb

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.

FelipeLema avatar May 02 '19 21:05 FelipeLema

I dont see 0.6.0 in https://github.com/JuliaRegistries/General/blob/master/L/Lint/Versions.toml

jayvdb avatar May 23 '19 09:05 jayvdb

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.

FelipeLema avatar May 23 '19 12:05 FelipeLema

I was just pointed out that we're supposed to use registration bot

FelipeLema avatar Jun 03 '19 18:06 FelipeLema

Any update on this? I am on Julia 1.1 and get the same error.

Octogonapus avatar Jul 08 '19 22:07 Octogonapus

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'

jayvdb avatar Jul 08 '19 22:07 jayvdb

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 avatar Aug 03 '19 21:08 CalebUsadi

@CalebUsadi Try this:

(v1.0) pkg> add Lint#v0.6.0

logankilpatrick avatar Aug 08 '19 01:08 logankilpatrick

@logankilpatrick

No changes! Is there a way to verify that perhaps the package itself is 0.6.0?

CalebUsadi avatar Aug 11 '19 19:08 CalebUsadi

I tried and that should work! You may need to do rn Lint in the package manager.

logankilpatrick avatar Aug 11 '19 23:08 logankilpatrick

And yes you can verify by looking at the repo and checking the most recent tagged release, which is 0.6.0.

logankilpatrick avatar Aug 11 '19 23:08 logankilpatrick

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?

CalebUsadi avatar Aug 15 '19 20:08 CalebUsadi

Yes sorry.

logankilpatrick avatar Aug 15 '19 20:08 logankilpatrick

If doing rm and then add Lint#0.6.0

logankilpatrick avatar Aug 15 '19 20:08 logankilpatrick

Doesn’t fix it, then maybe the version is being required by one of the other packages you are using.

logankilpatrick avatar Aug 15 '19 20:08 logankilpatrick