plumatic/schema

1.1.3-SNAPSHOT deploy to Clojars?

oubiwann opened this issue · 6 comments

Hello! We are preparing a release of some software that has schema as a dep (https://github.com/usgs-eros/?utf8=%E2%9C%93&query=lcmap), and master has a fix for something that broke in 1.1.2 for us. Any chance you could push a snapshot?

Worst case we can deploy with schema cloned to the deployment checkouts, but it would be nice if we could avoid that :-)

Regardless, thanks for the fantastic library, and good job inspiring the work on clojure.spec :-D

w01fe commented

Thanks!

I'm happy to cut a release, but I don't see any commits on master since the
1.1.2 release:

https://github.com/plumatic/schema/commits/master

Can you please elaborate on the issue you're seeing, and where the fix is
located?

On Wed, Jul 13, 2016 at 6:09 AM, Duncan McGreggor notifications@github.com
wrote:

Hello! We are preparing a release of some software that has schema as a
dep (https://github.com/usgs-eros/?utf8=%E2%9C%93&query=lcmap), and
master has a fix for something that broke in 1.1.2 for us. Any chance you
could push a snapshot?

Worst case we can deploy with schema cloned to the deployment checkouts,
but it would be nice if we could avoid that :-)

Regardless, thanks for the fantastic library, and good job inspiring the
work on clojure.spec :-D


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#364, or mute the thread
https://github.com/notifications/unsubscribe/AAIPprXgrU6bocs4hW9yRPNgXYVYO41fks5qVAKBgaJpZM4JK1BN
.

Crazy ... I just looked at the diff, and you're right.

Here's all I did:

  • upgraded from 1.1.0 to 1.1.2 -- at which point our schemas broke
  • downgraded back to 1.1.0, schemas worked again
  • upgraded to 1.1.1, schemas still worked
  • cloned the schema repo into checkouts, and HEAD worked

So I had simply assumed that a change had been applied, I hadn't actually examined the diff :-/

I'll take a more detailed look right now and see what I can uncover ...

Okay, I've worked my way back through revisions 8f3dfdd, 6d21635, c6e0813, 11f56b4, and 77ada81 (the last being 1.1.1), and all revs work with the schema repo cloned to the checkouts directory.

I then did a checkout of 6d21635 (tag 1.1.2) and compared that to the unzipped .jar file from Clojars for the 1.1.2 release. In particular, I looked at the files for the two namespaces mentioned in the error I got:

  • schema.utils
  • schema.coerce

No differences that I could see (for the generated .clj files).

Then I removed schema from the checkouts directory, letting the 1.1.2 dep take over again as a sanity check. It still failed. (Fortunately a coworker has confirmed the same problems, so either I'm not crazy ... or we both are!)

Next: removed all schema downloads from ~/.m2. lein downloaded 1.1.2 again (it also downloaded the 1.1.0 .pom file ... but not .jar) and things failed as before.

Running lein deps :tree confirmed that only one schema is pulled in as a dep.

Removed schema from ~/.m2 again, git checkout 6d21635 (1.1.2), then lein install. After installation, lein did download the .pom for 1.1.0, but it used the 1.1.2 that I had built locally (lein with-profile +dev cljx once then lein with-profile +dev jar) and installed, and that worked with no issues. I took a look at the build I generated (unzipped the .jar file) and diff'ed it against the one from Clojars. Nothing jumps out at me, but I do see that:

  • the JDK versions are different
  • the lein versions are different

At this point, I have no clue why the Clojars 1.1.2 is failing for us :-(

In case this helps, we're using:

  • Ubuntu 15.04
  • OpenJDK 64-Bit Server VM 1.7.0_91-b02
  • Clojure 1.8.0
  • Leiningen 2.5.3
w01fe commented

Thanks for the detailed run-down. From the error message in particular, I
think I know what's going on.

In this commit (between 1.1.0 and 1.1.1) PSimpleCell was removed entirely
and replaced with AtomicReference:

bf46988

so this means that you must somehow be pulling in pre-1.1.0 and post-1.1.1
versions. Since you don't see that in lein deps :tree, the next most
likely scenario is that you're using a library AOT compiled with pre-1.1.0
-- might that be the case? I don't understand why it would work with a
local checkout, but hopefully this can help point you in the right
direction.

Let me know if I can do anything else to help.

On Wed, Jul 13, 2016 at 12:17 PM, Duncan McGreggor <notifications@github.com

wrote:

Okay, I've worked my way back through revisions 8f3dfdd
8f3dfdd,
6d21635
6d21635,
c6e0813
c6e0813,
11f56b4
11f56b4,
and 77ada81
77ada81
(the last being 1.1.1), and all revs work with the schema repo cloned to
the checkouts directory.

I then did a checkout of 6d21635
6d21635
(tag 1.1.2) and compared that to the unzipped .jar file from Clojars for
the 1.1.2 release. In particular, I looked at the files for the two
namespaces mentioned in the error
https://gist.github.com/oubiwann/2e6aae71d16619ee137d21701018adf2 I got:

  • schema.utils
  • schema.coerce

No differences that I could see (for the generated .clj files).

Then I removed schema from the checkouts directory, letting the 1.1.2 dep
take over again as a sanity check. It still failed. (Fortunately a coworker
has confirmed the same problems, so either I'm not crazy ... or we both
are!)

Next: removed all schema downloads from ~/.m2. lein downloaded 1.1.2
again (it also downloaded the 1.1.0 .pom file ... but not .jar) and
things failed as before.

Running lein deps :tree confirmed that only one schema is pulled in as a
dep.

Removed schema from ~/.m2 again, git checkout 6d21635 (1.1.2), then lein
install. After installation, lein did download the .pom for 1.1.0, but it
used the 1.1.2 that I had built locally (lein with-profile +dev cljx once
then lein with-profile +dev jar) and installed, and that worked with no
issues. I took a look at the build I generated (unzipped the .jar file)
and diff'ed it against the one from Clojars
https://gist.github.com/oubiwann/d23edd302c43203e533505ab7119fb85.
Nothing jumps out at me, but I do see that:

  • the JDK versions are different
  • the lein versions are different

At this point, I have no clue why the Clojars 1.1.2 is failing for us :-(

In case this helps, we're using:

  • Ubuntu 15.04
  • OpenJDK 64-Bit Server VM 1.7.0_91-b02
  • Clojure 1.8.0
  • Leiningen 2.5.3


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#364 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAIPppXnqorxdQsXhxA76Sf_JUkNZn5hks5qVFivgaJpZM4JK1BN
.

Thanks so much for that hint!

You were indeed correct, that's exactly what was causing the problem. The true source of the mystery remains, since the culprit .jar files were being overridden by projects in checkouts ... this isn't the first time we've run into issues with checkouts, though.

Anyway, for posterity: schema was in no way at fault, and re-publishing the aot-compiled projects to Clojars with the latest schema release "fixed" the problem (symptom, really).

@w01fe: thanks again, that was above and beyond :-)

Closing; keyword: invalid

w01fe commented

Awesome -- glad I could help!