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

dev-lang/clojure: bumping to new version #19991

Closed
wants to merge 1 commit into from
Closed

dev-lang/clojure: bumping to new version #19991

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 18, 2021

Bumping to clojure-1.10.3

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Marco Scardovi marco@scardovi.com

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @scardracs
Areas affected: ebuilds
Packages affected: dev-lang/clojure

dev-lang/clojure: @gentoo/proxy-maint (maintainer needed)

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added maintainer-needed There is at least one affected package with no maintainer. Review it if you can. assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Mar 18, 2021
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-03-18 18:04 UTC
Newest commit scanned: 5cdb0b2
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/a5624562c2/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-03-18 21:54 UTC
Newest commit scanned: 93e6237
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/37106238d4/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-03-19 06:28 UTC
Newest commit scanned: d389a9c
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/1af8ae7b8a/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-03-19 07:09 UTC
Newest commit scanned: c0b3803
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/8b567e7321/output.html

Copy link
Member

@juippis juippis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are adding a new version, let the commit summary reflect that too.

dev-lang/clojure/clojure-1.10.3.ebuild Outdated Show resolved Hide resolved
dev-lang/clojure/clojure-1.10.3.ebuild Outdated Show resolved Hide resolved
Fixed slot for 1.10.3 in order to prevent the overshadow over 1.10.0

Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Marco Scardovi <marco@scardovi.com>
Copy link
Author

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have fixed all the requested changes

@ghost ghost requested a review from juippis March 21, 2021 12:08
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2021-03-21 12:23 UTC
Newest commit scanned: ebd4806
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/b126546201/output.html

Copy link
Member

@juippis juippis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests don't work. I also get an error when trying to run clojure, but as I don't do java, it might be related to my setup.

# clojure-1.10 
Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2212)
	at clojure.lang.RT.classForName(RT.java:2221)
	at clojure.lang.RT.loadClassForName(RT.java:2240)
	at clojure.lang.RT.load(RT.java:449)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__8365.invoke(core.clj:6115)
	at clojure.core$load.invokeStatic(core.clj:6114)
	at clojure.core$load.doInvoke(core.clj:6098)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5897)
	at clojure.core$load_one.invoke(core.clj:5892)
	at clojure.core$load_lib$fn__8305.invoke(core.clj:5937)
	at clojure.core$load_lib.invokeStatic(core.clj:5936)
	at clojure.core$load_lib.doInvoke(core.clj:5917)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$load_libs.invokeStatic(core.clj:5974)
	at clojure.core$load_libs.doInvoke(core.clj:5958)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$require.invokeStatic(core.clj:5996)
	at clojure.core.server$loading__8246__auto____10374.invoke(server.clj:9)
	at clojure.core.server__init.load(Unknown Source)
	at clojure.core.server__init.<clinit>(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2212)
	at clojure.lang.RT.classForName(RT.java:2221)
	at clojure.lang.RT.loadClassForName(RT.java:2240)
	at clojure.lang.RT.load(RT.java:449)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__8365.invoke(core.clj:6115)
	at clojure.core$load.invokeStatic(core.clj:6114)
	at clojure.core$load.doInvoke(core.clj:6098)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5897)
	at clojure.core$load_one.invoke(core.clj:5892)
	at clojure.core$load_lib$fn__8305.invoke(core.clj:5937)
	at clojure.core$load_lib.invokeStatic(core.clj:5936)
	at clojure.core$load_lib.doInvoke(core.clj:5917)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$load_libs.invokeStatic(core.clj:5974)
	at clojure.core$load_libs.doInvoke(core.clj:5958)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$require.invokeStatic(core.clj:5996)
	at clojure.core$require.doInvoke(core.clj:5996)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.lang.Var.invoke(Var.java:384)
	at clojure.lang.RT.doInit(RT.java:491)
	at clojure.lang.RT.init(RT.java:467)
	at clojure.main.main(main.java:38)
Caused by: Syntax error macroexpanding clojure.core/defn at (clojure/spec/alpha.clj:78:1).
	at clojure.lang.Compiler.checkSpecs(Compiler.java:6976)
	at clojure.lang.Compiler.macroexpand1(Compiler.java:6992)
	at clojure.lang.Compiler.macroexpand(Compiler.java:7079)
	at clojure.lang.Compiler.eval(Compiler.java:7165)
	at clojure.lang.Compiler.load(Compiler.java:7640)
	at clojure.lang.RT.loadResourceScript(RT.java:381)
	at clojure.lang.RT.loadResourceScript(RT.java:372)
	at clojure.lang.RT.load(RT.java:459)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__8365.invoke(core.clj:6115)
	at clojure.core$load.invokeStatic(core.clj:6114)
	at clojure.core$load.doInvoke(core.clj:6098)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5897)
	at clojure.core$load_one.invoke(core.clj:5892)
	at clojure.core$load_lib$fn__8305.invoke(core.clj:5937)
	at clojure.core$load_lib.invokeStatic(core.clj:5936)
	at clojure.core$load_lib.doInvoke(core.clj:5917)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$load_libs.invokeStatic(core.clj:5974)
	at clojure.core$load_libs.doInvoke(core.clj:5958)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$require.invokeStatic(core.clj:5996)
	at clojure.main$loading__8246__auto____10507.invoke(main.clj:11)
	at clojure.main__init.load(Unknown Source)
	at clojure.main__init.<clinit>(Unknown Source)
	... 55 more
Caused by: java.lang.Exception: #object[clojure.spec.alpha$and_spec_impl$reify__1048 0x30af7377 "clojure.spec.alpha$and_spec_impl$reify__1048@30af7377"] is not a fn, expected predicate fn
	at clojure.spec.alpha$dt.invokeStatic(alpha.clj:762)
	at clojure.spec.alpha$dt.invoke(alpha.clj:752)
	at clojure.spec.alpha$dt.invokeStatic(alpha.clj:753)
	at clojure.spec.alpha$dt.invoke(alpha.clj:752)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1527)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1535)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$deriv$fn__1290.invoke(alpha.clj:1537)
	at clojure.core$map$fn__7393.invoke(core.clj:2759)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__6928.invokeStatic(core.clj:139)
	at clojure.core$map$fn__7400.invoke(core.clj:2767)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__6928.invokeStatic(core.clj:139)
	at clojure.core$filter$fn__7420.invoke(core.clj:2813)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__6928.invokeStatic(core.clj:139)
	at clojure.core$map$fn__7393.invoke(core.clj:2750)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:535)
	at clojure.core$seq__6928.invokeStatic(core.clj:139)
	at clojure.core$seq__6928.invoke(core.clj:139)
	at clojure.spec.alpha$filter_alt.invokeStatic(alpha.clj:1424)
	at clojure.spec.alpha$filter_alt.invoke(alpha.clj:1418)
	at clojure.spec.alpha$alt_STAR_.invokeStatic(alpha.clj:1428)
	at clojure.spec.alpha$alt_STAR_.invoke(alpha.clj:1427)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1537)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1535)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1536)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$deriv.invokeStatic(alpha.clj:1536)
	at clojure.spec.alpha$deriv.invoke(alpha.clj:1521)
	at clojure.spec.alpha$re_conform.invokeStatic(alpha.clj:1662)
	at clojure.spec.alpha$re_conform.invoke(alpha.clj:1653)
	at clojure.spec.alpha$regex_spec_impl$reify__1374.conform_STAR_(alpha.clj:1703)
	at clojure.spec.alpha$conform.invokeStatic(alpha.clj:164)
	at clojure.spec.alpha$conform.invoke(alpha.clj:160)
	at clojure.spec.alpha$macroexpand_check.invokeStatic(alpha.clj:701)
	at clojure.spec.alpha$macroexpand_check.invoke(alpha.clj:697)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.lang.Compiler.checkSpecs(Compiler.java:6974)
	... 82 more

@ghost
Copy link
Author

ghost commented Mar 21, 2021

@juippis I have tested it and actually works so I don't know what happened. I will do further tests

@toshokan
Copy link
Contributor

Unfortunately, starting a clojure repl doesn't work on my machine either.
It looks like this version bump was based on clojure-1.10, but clojure can no longer be built that way.

I investigated this a little while ago but never got to around to making the PR

Since clojure-1.10.1 (specifically since CLJ-2484), spec-alpha can no longer be a source-only-JAR. Upstream does not run into this issue, because their builds use prebuilt maven packages for spec-alpha, so their JARs contain bytecode.

Our dev-java/spec-alpha does not depend on clojure, so we have no way to build anything but a source-only-JAR. Building clojure from source also depends on spec-alpha, so we'd have a dependency cycle if we tried to invert these.

Interestingly though, while clojure requires a precompiled spec-alpha to run interactively/start a repl, it does not require it to just compile clj files (it only requires sources).

I think the way forward will be a simple bootstrapping process

  • build dev-lang/clojure with spec-alpha on the classpath by downloading its sources from the clojure ebuild
  • have dev-lang/clojure RDEPEND (but not BDEPEND) on dev-java/spec-alpha
  • have dev-java/spec-alpha BDEPEND on dev-lang/clojure so we can properly build a JAR with bytecode

@ghost
Copy link
Author

ghost commented Mar 22, 2021

The thing I don't understand is why it works on my PC without issues and not in others

@toshokan
Copy link
Contributor

How did you build dev-java/spec-alpha?

@ghost
Copy link
Author

ghost commented Mar 22, 2021

@toshokan simply emerging it. I have also made a PR for version bump #20017

@toshokan
Copy link
Contributor

Can you check if your spec-alpha jar has .class files in it?

@ghost
Copy link
Author

ghost commented Mar 22, 2021

@toshokan @juippis ok I can report same error now. I can't before because I hadn't noticed that it was installing the 1.10.0. My bad, sorry

@juippis
Copy link
Member

juippis commented Mar 22, 2021

dac5816 I've reverted the bump to 1.10.3. This also took you out as a maintainer from metadata.xml, as it was paired with a version bump commit. A good lesson why you should modify metadata.xml becoming a maintainer in a separate commit ;)

I do expect you to figure this out, and become the commit again in a working version bump. Hence I didn't re-assign the bugs to maintainer-needed. Please let me know if you have no intention of working on this package, and I'll assign the bugs properly.

Sorry for the mess, I should get more familiar with java :I

@tgbugs
Copy link
Contributor

tgbugs commented Mar 23, 2021

I think that @toshokan has the assessment of the situation. When I did this originally I specifically hunted down versions that didn't have the bootstrapping problems caused by dependence on maven. Going forward this means that if we want to be able to bootstrap clojure we will likely have to find intermediate versions that can be built using an earlier slot.

@ghost
Copy link
Author

ghost commented Mar 23, 2021

Can you check if your spec-alpha jar has .class files in it?

At the end I managed to check it and no, no .class file on it

@ghost ghost deleted the clojure branch March 27, 2021 15:48
@ghost
Copy link
Author

ghost commented Mar 30, 2021

@tgbugs @toshokan I have tried to take a look on it but I don't know java so well so I will not able to make it fixed. Also there is a problem on test with 1.10.0 (test is ATM restriced so it is a problem only when run ebuild clojure-1.10.0.ebuild clean test). More info here: https://bugs.gentoo.org/737064

@toshokan
Copy link
Contributor

In that case I'd like to take a look at it.

@ghost
Copy link
Author

ghost commented Mar 30, 2021

@toshokan thanks :) I have requested a stabilization for 1.10.0 before notice the bug on test, so please take a look on it https://bugs.gentoo.org/777264

@tgbugs
Copy link
Contributor

tgbugs commented Mar 30, 2021

IIRC there is no effective way to run the tests for this.
Running FEATURES=test ebuild clojure-1.10.0.ebuild test runs into issues where the classpath that works after merge does not work during testing so you wind up with

     [java] Caused by: java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.

There was not an easy way forward to fix that when I worked on it.

@ghost
Copy link
Author

ghost commented Mar 30, 2021

@tgbugs so I have to drop stabilization request as test is a common part on it

@ghost
Copy link
Author

ghost commented Mar 30, 2021

@juippis what you think?

@tgbugs
Copy link
Contributor

tgbugs commented Mar 30, 2021

I would keep it masked because despite the fact that it does install a working clojure repl, there are some caveats, such as the fact that you can't just follow most of the instructions for how to get started with clojure because we don't use the uberjar that has all sorts of stuff bundled. I dug into this a while back, but essentially clojure as a whole has gone the way of maven, so anyone who wants to run these stripped down versions of clojure needs to know what they are doing.

@ghost
Copy link
Author

ghost commented Mar 30, 2021

It's up to you. I'm drop it as said before because I haven't the knowledge to fix nor I'm able to ask properly upstream what they could do to fix it. I'm sorry if I messed up this so much

@toshokan
Copy link
Contributor

A few months ago I found a way to bootstrap a clojure-1.10.1 build without maven and also build the clj cli tools, so hopefully the situation isn't so dire.

@ghost
Copy link
Author

ghost commented Mar 30, 2021

@toshokan I have dropped request for stabilization so you and @tgbugs have all the time to take a look and try to fix :)

@tgbugs
Copy link
Contributor

tgbugs commented Mar 30, 2021

@toshokan if we can get the clj cli tools in tree that might be the most concrete way forward, pull me in on any bugs/prs related to that if you want.

gentoo-repo-qa-bot pushed a commit to gentoo-mirror/flow that referenced this pull request Apr 15, 2021
This is the initial import of the broken ebuild from
gentoo/gentoo#19991 (with minor
modifications).
@Flowdalic
Copy link
Member

A few months ago I found a way to bootstrap a clojure-1.10.1 build without maven and also build the clj cli tools, so hopefully the situation isn't so dire.

Care to share what you found? I am also Interessent in a bootstraping solution for clojure (latest version in my case, but I assume it is applicable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). maintainer-needed There is at least one affected package with no maintainer. Review it if you can. no bug found No Bug/Closes found in the commits.
Projects
None yet
6 participants