JuliaGeometry / GeometricalPredicates.jl

Fast and robust 2D & 3D incircle/intriangle/etc. for Julia
Other
57 stars 14 forks source link

Problems on Travis #20

Closed robertdj closed 8 years ago

robertdj commented 8 years ago

I'm experiencing a weird problem with the testing on Travis.

GeometricalPredicates imports ! from Base. It used to be with import Base.! that does not work in Julia v0.5, but recently it was changed to import Base: ! that works in both Julia v0.4 and v0.5.

On my local, newly compiled Julia v0.5 with a freshly added GeometricalPredicates everything works as expected, but when testing the VoronoiCells package on Travis it fails for Julia v0.5 because

ERROR: LoadError: syntax: invalid operator ".!" (Line 366)

I updated the REQUIRE for VoronoiCells to explicitly include GeometricalPredicates v0.0.5, but this did not help. The only directly required package is VoronoiDelaunay.

Have I overlooked something?

robertdj commented 8 years ago

I think I have identified the issue. The tag v0.0.5 is later than v0.05 (that does not import ! correctly), but when adding the latest version of GeometricalPredicates v0.05 is checked out -- maybe it is interpreted as v0.5?

@skariel : Is it possible to delete the tag v0.05?

skariel commented 8 years ago

done!

robertdj commented 8 years ago

Thanks! The v0.05 tag is not seen in this GitHub repo, but it is still the version checked out when running Pkg.add("GeometricalPredicates") and also the version used on Travis. For now, I get a successful run on Travis with a Pkg.checkout("GeometricalPredicates").

Unfortunately, I don't have the Git(Hub) skills to figure out how fix this tagging issue. Maybe it should also be fixed in METADATA?

robertdj commented 8 years ago

BTW this issue is also causing the VoronoiDelaunay tests to fail on Travis.

robertdj commented 8 years ago

@tkelman : I hope it's okay to ask for your help? You seem to know everything about Julia packages.

GeometricalPredicates has/had a tag called v0.05 with only one . that does not work on Julia v0.5. The latest tag is v0.0.5 with two . and this works on Julia v0.5.

Unfortunately, Pkg.add("GeometricalPredicates") checks out the v0.05 and so does e.g. Pkg.add("VoronoiDelaunay") whose REQUIRE file contains the line:

GeometricalPredicates 0.0.5

The releases and (as far as I can tell) METADATA no longer contain a v0.05.

Do you know how to fix this issue?

tkelman commented 8 years ago

Strange. I don't see it in METADATA (https://github.com/JuliaLang/METADATA.jl/tree/metadata-v2/GeometricalPredicates/versions) or in the tags. What does your Pkg.status(), and git status inside Pkg.dir("METADATA") say?

robertdj commented 8 years ago

I wiped ~/.julia/v0.5 and ~/.julia/lib/v0.5 to start on a clean slate. First 3 commands after this:

julia> Pkg.update() INFO: Initializing package repository /home/robert/.julia/v0.5 INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl INFO: Updating METADATA... INFO: Computing changes... INFO: No packages to install, update or remove

julia> Pkg.add("GeometricalPredicates") INFO: Installing Compat v0.9.2 INFO: Installing GeometricalPredicates v0.0.5 INFO: Package database updated

julia> Pkg.status() 1 required packages:

  • GeometricalPredicates 0.0.5 1 additional packages:
  • Compat 0.9.2

The output of git status in ~/.julia/v0.5/METADATA:

$ git status On branch metadata-v2 Your branch is up-to-date with 'origin/metadata-v2'.

nothing to commit, working directory clean

In ~/.julia/v0.5/GeometricalPredicates:

$ git tag v0.0.1 v0.0.2 v0.0.4 v0.05

And Pkg.test("GeometricalPredicates") fails.

robertdj commented 8 years ago

BTW: Running Pkg.checkout("GeometricalPredicates") adds a v0.0.5 tag in ~/.julia/v0.5/GeometricalPredicates and the package then works.

tkelman commented 8 years ago

Hm, interesting. I see the git tag too, but only in a clone that's been around for a while. The bad tag must've been deleted since then. Try deleting ~/.julia/.cache/GeometricalPredicates and ~/.julia/v0.5/GeometricalPredicates then running Pkg.resolve() ?

tkelman commented 8 years ago

Pkg typically only works based on git sha's rather than tag names, so I'm not sure exactly what was happening.

robertdj commented 8 years ago

After deleting the .cache folder the v0.05 tag is gone, but installing GeometricalPredicates again the chekced out commit is still the one that used to have the v0.05 tag.

julia> Pkg.resolve() INFO: No packages to install, update or remove

In the shell:

$ git tag v0.0.1 v0.0.2 v0.0.4 v0.0.5

tkelman commented 8 years ago

I see 916081fd59a2690bd3fb9e55506111e2ae8fa338, which is the tagged commit in https://github.com/JuliaLang/METADATA.jl/blob/metadata-v2/GeometricalPredicates/versions/0.0.5/sha1 - which commit are you seeing?

robertdj commented 8 years ago

The same. But this is from 2016-07-12 (a pull request from you) and not tagged with v0.0.5 on my machine (using gitk). If you checkout the master branch you see the 'real' v0.0.5 from 2016-09-13 (commit b85654e381859fd933b31919f526a843c353e6a2).

tkelman commented 8 years ago

Like I said, Julia Pkg doesn't use git tags, only the metadata information. They should usually match, but here it looks like they don't.

robertdj commented 8 years ago

Right. Is there a way to fix this?

tkelman commented 8 years ago

Delete the 0.0.5 git tag, replace it with the same sha as the metadata 0.0.5 tag. Make a new 0.0.6 git and metadata tag, from the same commit (edit: by which I mean latest master), and open a METADATA PR. If it drops support for Julia 0.4 then it should be 0.1.0 instead.

tkelman commented 8 years ago

Oh and before making a new metadata tag, best to add a minimum version dependency on your Compat requirement that corresponds to the newest features you're using.

tkelman commented 8 years ago

Not sure if you're using anything that doesn't go through the @compat macro here but you might be able to just drop the Compat requirement and that one use of the macro. Would need to test that though.

robertdj commented 8 years ago

Great -- thanks a lot for your help! @skariel : Do you want to be in charge of the tagging?

skariel commented 8 years ago

@robertdj I prefer not, can you do this?

robertdj commented 8 years ago

Sure.

skariel commented 8 years ago

Thanks, I sent you an invite to be a collaborator with write access, the should do right?

robertdj commented 8 years ago

I think so. @tkelman : Just to make sure I'm not screwing this up.

git tag -d v0.0.5
git tag v0.0.5 916081fd59a2690bd3fb9e55506111e2ae8fa338
tkelman commented 8 years ago

tag -d will only delete the tag locally. I think it's git push origin :v0.0.5 to delete the tag here on the remote.

robertdj commented 8 years ago

I've made the updates and Travis is satisfied. @skariel : VoronoiDelaunay should also be update to require the new GP (when it is accepted). Do you want me to make a PR?

skariel commented 8 years ago

@robertdj sure, please go ahead with the PR

robertdj commented 8 years ago

@skariel : The issues with GeometricalPredicates should be fixed, but awaits approval. I added the latest version of the Colors to REQUIRE for VD -- would you prefer a lower version? I am making a PR for VororoniDelaunay later today, but I think you have to run the PkgDev.tag("VoronoiDelaunay") and submit as I don't have write access to the VD repo.

skariel commented 8 years ago

@robertdj thanks! the latest colors is fine. Also I'm giving you write access to the VD repo, so you can tag it

robertdj commented 8 years ago

Thanks for the access. I'll get started.