-
Notifications
You must be signed in to change notification settings - Fork 131
Scala-js 1.0.6 does not contains classes #119
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
Comments
This might be my bad, I'm taking a look. |
My observations: if I run
However, with
I have very little experience with Scala.js. @sjrd, is the above expected? |
Potentially relevant changes between 1.0.5 and 1.0.6:
|
Definitely not. Scala.js jars published on Maven/Bintray/etc. look very much like JVM jars. They just have .sjsir files in addition to .class files. They should not be virtually empty like in your listing above. |
OK, thanks, I'll have to do some digging in sbt :) |
I didn't find the issue.
But then I don't know how that jar is built:
|
Some exploratory notes. To summarise:
The reason looks like it's because:
Why are these different? Because of sbt-osgi - in version 0.7.0 it redefines packagedArtifact in (Compile, packageBin) <<=
(artifact in (Compile, packageBin), OsgiKeys.bundle).identityMap Indeed running
As a next step I've encouraged @lrytz to upgrade to a more modern sbt-osgi 0.8.0; perhaps it doesn't clash with sbt-scalajs. |
I did my best here, but no success so far. Here's the branch where I upgrade sbt-scala-module to sbt-osgi 0.9.1: https://github.com/scala/sbt-scala-module/compare/master...lrytz:sbt-osgi-0.9.1?expand=1 @dwijnand there's a strange thing happening: when I add Here's a branch of this repo using that new plugin version: https://github.com/scala/scala-parser-combinators/compare/1.0.x...lrytz:sbt-osgi-0.9.1?expand=1 Without adding diff -u -r b/META-INF/MANIFEST.MF a/META-INF/MANIFEST.MF
--- b/META-INF/MANIFEST.MF 2017-07-05 10:27:04.000000000 +0200
+++ a/META-INF/MANIFEST.MF 2017-07-05 08:26:12.000000000 +0200
@@ -1,8 +1,12 @@
Manifest-Version: 1.0
-Bnd-LastModified: 1499243224337
+Bnd-LastModified: 1499243172774
+Bundle-Description: scala-parser-combinators
+Bundle-License: http://opensource.org/licenses/BSD-3-Clause;description=
+ BSD 3-clause
Bundle-ManifestVersion: 2
-Bundle-Name: org.scala-lang.modules.scala-parser-combinators
+Bundle-Name: scala-parser-combinators
Bundle-SymbolicName: org.scala-lang.modules.scala-parser-combinators
+Bundle-Vendor: org.scala-lang.modules
Bundle-Version: 1.0.7.SNAPSHOT
Created-By: 1.8.0_131 (Oracle Corporation)
Export-Package: scala.util.parsing.combinator;version="1.0.7.SNAPSHOT";u
@@ -26,12 +30,12 @@
til,scala.util.parsing.combinator,scala.util.parsing.combinator.lexical
,scala.util.parsing.combinator.syntactical,scala.util.parsing.combinato
r.token,scala.util.parsing.input"
-Import-Package: scala;version="[2.12,3)",scala.collection;version="[2.12
- ,3)",scala.collection.generic;version="[2.12,3)",scala.collection.immut
- able;version="[2.12,3)",scala.collection.mutable;version="[2.12,3)",sca
- la.math;version="[2.12,3)",scala.reflect;version="[2.12,3)",scala.runti
- me;version="[2.12,3)",scala.runtime.java8;version="[2.12,3)",scala.sys;
- version="[2.12,3)",scala.util;version="[2.12,3)",scala.util.matching;ve
- rsion="[2.12,3)"
+Import-Package: scala,scala.collection;version="[2.12,3)",scala.collecti
+ on.generic;version="[2.12,3)",scala.collection.immutable;version="[2.12
+ ,3)",scala.collection.mutable;version="[2.12,3)",scala.math;version="[2
+ .12,3)",scala.reflect;version="[2.12,3)",scala.runtime;version="[2.12,3
+ )",scala.runtime.java8;version="[2.12,3)",scala.sys;version="[2.12,3)",
+ scala.util,scala.util.matching;version="[2.12,3)"
Private-Package: scala-parser-combinators.properties
-Tool: Bnd-2.1.0.20130426-122213
+Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+Tool: Bnd-2.4.0.201411031534 However, the initial bug is not fixed, running |
SbtOsgi seems to have been authored to be an AutoPlugin that doesn't auto-trigger. There is no way to force the triggering of a plugin with another plugin. For more info there is a feature request for exactly this, as well as arguments against, at sbt/sbt#2093. Here's a few possible solutions/notes (so you can pick and choose):
|
@dwijnand as far as I can tell, the change I mentioned above (https://github.com/scala/sbt-scala-module/compare/master...lrytz:sbt-osgi-0.9.1?expand=1), the SbtOsgi plugin does its work when adding the sbt-scala-module plugin, I get a manifest with OSGi stuff. What surprised me is that adding |
So to summarize, I think we are fine with the new version of SbtOsgi, we just add its settings to the |
Thanks for still pushing on this issue @lrytz. Would it make sense to remove the Osgi plugin and do a normal release so that we can at least get the latest version of the code officially available? |
I guess OSGi metadata is really unnecessary in an sjs-jar, so we could enable it on the JVM project only. That would be easy enough. |
That would indeed make sense! |
Move jvm-specific settings from scalaModuleSettings to a new scalaModuleSettingsJVM setting. This means that JVM projects in scala modules now have to add bot `scalaModuleSettings` and `scalaModuleSettingsJVM`. Adding sbt-osgi settings in a scala-js project caused the published jar to be empty (scala/scala-parser-combinators#119).
Move jvm-specific settings from scalaModuleSettings to a new scalaModuleSettingsJVM setting. This means that JVM projects in scala modules now have to add bot `scalaModuleSettings` and `scalaModuleSettingsJVM`. Adding sbt-osgi settings in a scala-js project caused the published jar to be empty (scala/scala-parser-combinators#119). Upgrades sbt-osgi to the latest version. Also anticipates the new optimizer settings in 2.12.3 (scala/scala#5964).
OK, that worked. PR scala/sbt-scala-module#27, will release a new version of the |
Move jvm-specific settings from scalaModuleSettings to a new scalaModuleSettingsJVM setting. This means that JVM projects in scala modules now have to add bot `scalaModuleSettings` and `scalaModuleSettingsJVM`. Adding sbt-osgi settings in a scala-js project caused the published jar to be empty (scala/scala-parser-combinators#119). Upgrades sbt-osgi to the latest version. Also anticipates the new optimizer settings in 2.12.3 (scala/scala#5964).
Move jvm-specific settings from scalaModuleSettings to a new scalaModuleSettingsJVM setting. This means that JVM projects in scala modules now have to add bot `scalaModuleSettings` and `scalaModuleSettingsJVM`. Adding sbt-osgi settings in a scala-js project caused the published jar to be empty (scala/scala-parser-combinators#119). Upgrades sbt-osgi to the latest version. Also anticipates the new optimizer settings in 2.12.3 (scala/scala#5964).
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition. The scala-js sbt plugin is no longer explicitly added, as it's already available through the sbt-scala-module plugin.
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition. The scala-js sbt plugin is no longer explicitly added, as it's already available through the sbt-scala-module plugin.
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition.
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition.
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition.
Add osgi settings only to the `JVM` project. In the JS project they caused the resulting jar to be empty. Fixes scala#119 Adds MiMa checking to the JS jar. Minor cleanups in the build definition.
@lrytz any update on this? waiting for correct 2.13.0-M2 support in 1.0.7 :) |
1.0.7 has been released with working scala-js support for 2.13.0-M2, see #130. |
@cheeseng and 1.1.0 is coming soon with 2.13.0-M3 support |
1.0.6
is published as a bundle and does not contain classes like1.0.5
Could you please publish the latest version as a normal jar?
The text was updated successfully, but these errors were encountered: