summaryrefslogtreecommitdiff
path: root/project/Osgi.scala
Commit message (Collapse)AuthorAgeFilesLines
* Rewire package to osgiBundle for OSGi-enabled projectsDale Wijnand2017-03-151-1/+2
| | | | Fixes scala/scala-dev#317.
* Workaround bug in Scala runtime reflection on JDK 9Jason Zaugg2017-02-161-0/+2
| | | | | | | | | | | | | | | | | | | The underlying bug is tracked as https://github.com/scala/scala-dev/issues/304 and blocks our SBT starting on JDK 9. This commit avoids using the empty package in our build definition. After this change, I needed to manually clean the class files from the build definition as follows, which might indicate a bug in SBT. $ sbt ... /Users/jz/code/scala-java9-ci/build.sbt:0: warning: imported `BuildSettings' is permanently hidden by definition of object BuildSettings import ..., _root_.scala.build.BuildSettings, ... ^C % rm -rf project/target/scala-2.10/sbt-0.13/classes/ % sbt # okay second time
* Don’t include scala-asm.jar in scala-compiler.jarStefan Zeiger2016-11-101-4/+9
| | | | Fixes https://github.com/scala/scala-dev/issues/254
* Avoid 2 more deprecated sbt 0.12 operatorsDale Wijnand2016-11-041-1/+1
|
* avoid deprecated sbt 0.12 operatorsSeth Tisue2016-11-041-2/+2
|
* remove various references to Ant buildSeth Tisue2016-09-021-3/+3
|
* Merge commit 'aaf7bc0' into merge-2.11-to-2.12-june-19Lukas Rytz2016-06-211-2/+2
|\
| * Remove bnd warnings from log outputStefan Zeiger2016-06-141-1/+1
| |
| * Use sbt for PR validationStefan Zeiger2016-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support directories in `-doc-external-doc`: It is documented as accepting a “classpath_entry_path” for the keys but this only worked for JARs and not for individual class files. When checking for external-doc mappings for a Symbol, we now find the root directory relative to a class file instead of using the full class file path. The corresponding tests for SI-191 and SI8557 are also fixed to support individual class files instead of JARs in partest. This is required for the sbt build which runs partest on “quick” instead of “pack”. - Fix version and repository handling for bootstrapping. The bootstrap `scalaInstance` can now be resolved from any repository added to the project (not just the bootstrap repositories) by using a different workaround for https://github.com/sbt/sbt/issues/1872. - Workaround for https://github.com/sbt/sbt/issues/2640 (putting the wrong `scalaInstance` on partest’s classpath). The required `ScalaInstance` constructor is deprecated, so we have to disable deprecation warnings and fatal warnings until there is a better fix. - Add MiMa to the sbt build (port of the old `test.bc` ant task). The sbt-mima plugin doesn’t have all the features we need, so we do it manually in a similar way to what the plugin does. Checks are done in both directions for the `library` and `compiler` projects. The base version has to be set in `build.sbt`. When set to `None`, MiMa checks are skipped. MiMa checks are run sequentially to avoid spurious errors (see https://github.com/typesafehub/migration-manager/issues/115). - Port the OSGi tests to the sbt build. The set of JARs that gets copied into build/osgi as bundles is a bit different from the ant build. We omit the source JARs but add additional modules that are part of the Scala distribution, which seems more correct. - Get rid up `pull-binary-libs.sh` for the sbt build. Add artifacts are resolved from the special bootstrap repository through Ivy. The special `code.jar` and `instrumented.jar` artifacts are copied to the location where partest expects them (because these paths are hardcoded in partest). Other extra JARs for partest in `test/files/lib` are referenced directly from the Ivy cache. - Move common settings that should be available with unqualified names in local `.sbt` files and on the command line into an auto-plugin. - Add an `antStyle` setting to sbt to allow users to easily enable ant-style incremental compilation instead of sbt’s standard name hashing with `set antStyle := true`. - Disable verbose `info`-level logging during sbt startup for both, `validate/test` and `validate/publish-core` jobs. Update logging is no longer disabled when running locally (where it is useful and doesn’t generate excessive output). - Pass optimization flags for scalac down to partest, using the new partest version 1.0.15\6. - Call the new sbt-based PR validation from `scripts/jobs/validate/test`. - Disable the tests `run/t7843-jsr223-service` and `run/t7933` from https://github.com/scala/scala/pull/4959 for now. We need to set up a new test project (either partest or junit) that can run them on a packaged version of Scala, or possibly move them into a separate project that would naturally run from a packaged Scala as part of the community build.
* | Merge commit '139f6bf' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-011-2/+11
|\|
| * Jarlist scala-library in build.sbtRaphael Jolly2016-05-211-2/+11
| |
* | Merge commit 'd06ce96' into merge/2.11.x-to-2.12.x-20160511Jason Zaugg2016-05-111-1/+0
|\|
| * Publish usable Scala distributions to Ivy repositoriesStefan Zeiger2016-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - sbt requires a `default` configuration in the Scala distribution but doesn’t publish such a configuration to Ivy repositories by default. This is not a problem when publishing to a Maven repository because Maven doesn’t use the concept of configurations and Ivy creates a standard set (including `default`) when resolving artifacts from Maven repositories, but it prevents the use of any Scala distribution published with `publishLocal`. The underlying issue is that sbt requires `default` instead of `default(compile)`. We work around this limitation by publishing a dummy `default` configuration. - sbt has hardcoded dependencies on the `scala-library` artifact of type `jar`. In the tradition of `sbt-osgi` we used type `bundle` when publishing via Ivy but this makes the artifacts unusable from sbt. We now publish the OSGi bundles directly as type `jar` (which is compatible with how they appear in Ivy after resolving from a Maven repository). - We have to be more aggressive about not publishing certain subprojects, otherwise `ivy.xml` files could still be published even when using `publishArtifacts := false`. - `removePomDependencies` now also modifies `ivy.xml` in addition to the Maven POM so that bogus dependencies do not leak into the Ivy descriptors. Fixes https://github.com/scala/scala-dev/issues/130
* | SI-9684 Deprecate JavaConversionsSom Snytt2016-04-221-4/+4
| | | | | | | | | | | | | | | | | | Implicit conversions are now in package convert as ImplicitConversions, ImplicitConversionsToScala and ImplicitConversionsToJava. Deprecated WrapAsJava, WrapAsScala and the values in package object. Improve documentation.
* | Merge commit 'bf599bc' into merge/2.11.x-to-2.12.x-20160203Jason Zaugg2016-02-031-0/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala src/compiler/scala/tools/nsc/transform/Constructors.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala src/scaladoc/scala/tools/nsc/doc/html/resource/lib/jquery.layout.js
| * Fix dependency problems in the sbt buildStefan Zeiger2015-11-301-0/+1
| | | | | | | | | | | | | | | | | | - Create the directory for the output file when building an OSGi bundle. Otherwise a publishing command would fail if dist/mkPack had not been run before. - Depend only on “packagedArtifact” in “mkPack”, not on “packageBin”. The latter is sbt’s standard packaging task but some of the required dependencies need to be packaged as OSGi bundles.
| * [nomerge] Create a full Scala distribution from sbtStefan Zeiger2015-11-241-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replicates the results of `ant -Dlocker.skip=1 distpack` with the following differences: - The POM files produced by the ant build under dists/maven still contain unresolved variables like `@VERSION@`. The ant build resolves them in the actual publishing process. The sbt build generates the correct version numbers directly. - Scaladoc sets in the ant build are created with the scaladoc tool from “quick”. The sbt build uses the STARR scaladoc. - The scaladoc sets for scala-actors, scala-compiler, scala-reflect and scalap from the ant build contain documentation for the classes `Null`, `Nothing`, `Any` and `AnyRef`. The sbt build omits those classes from all doc sets (except for scala-library, of course) under the assumption that this is a bug in the ant build. Other idiosyncracies of the ant build like declaring a packaging type of `jar` (instead of `bundle`) for OSGi bundles, or using slightly different module names and descriptions in scaladocs, OSGi bundles and POMs, are reproduced faithfully for now. Publishing from the sbt build is done in the usual sbt way. No actual publishing targets are currently defined in the build. In order to test stability of the publishing process, the `publishDists` task can be used to publish to dists/maven-sbt with the same directory layout and naming conventions employed by the ant build for publishing to dists/maven. Source and binary JARs are OSGi-enabled. For the source JARs this is done by hand-crafting the appropriate MANIFEST.MF entries (like the ant build does). Binary JARs are packaged with BND, using the same outdated BND version as the ant build for now to get identical results. We do not use sbt-osgi because it depends on a newer version of BND (probably OK to upgrade in the future) and does not allow a crucial bit of configuration that we need: Setting the classpath for BND. In sbt-osgi this is always `fullClasspath in Compile` whereas we really want `products in Compile in packageBin` to keep things simple.
* Create a full Scala distribution from sbtStefan Zeiger2015-11-271-0/+69
This replicates the results of `ant -Dlocker.skip=1 distpack` with the following differences: - The POM files produced by the ant build under dists/maven still contain unresolved variables like `@VERSION@`. The ant build resolves them in the actual publishing process. The sbt build generates the correct version numbers directly. - Scaladoc sets in the ant build are created with the scaladoc tool from “quick”. The sbt build uses the STARR scaladoc. - The scaladoc sets for scala-actors, scala-compiler, scala-reflect and scalap from the ant build contain documentation for the classes `Null`, `Nothing`, `Any` and `AnyRef`. The sbt build omits those classes from all doc sets (except for scala-library, of course) under the assumption that this is a bug in the ant build. Other idiosyncracies of the ant build like declaring a packaging type of `jar` (instead of `bundle`) for OSGi bundles, or using slightly different module names and descriptions in scaladocs, OSGi bundles and POMs, are reproduced faithfully for now. Publishing from the sbt build is done in the usual sbt way. No actual publishing targets are currently defined in the build. In order to test stability of the publishing process, the `publishDists` task can be used to publish to dists/maven-sbt with the same directory layout and naming conventions employed by the ant build for publishing to dists/maven. Source and binary JARs are OSGi-enabled. For the source JARs this is done by hand-crafting the appropriate MANIFEST.MF entries (like the ant build does). Binary JARs are packaged with BND, using the same outdated BND version as the ant build for now to get identical results. We do not use sbt-osgi because it depends on a newer version of BND (probably OK to upgrade in the future) and does not allow a crucial bit of configuration that we need: Setting the classpath for BND. In sbt-osgi this is always `fullClasspath in Compile` whereas we really want `products in Compile in packageBin` to keep things simple. Conflicts: build.sbt