Git Product home page Git Product logo

scala-dist's Introduction

This is Scala 2! Welcome!

This is the home of the Scala 2 standard library, compiler, and language spec.

For Scala 3, visit scala/scala3.

How to contribute

Issues and bug reports for Scala 2 are located in scala/bug. That tracker is also where new contributors may find issues to work on: good first issues, help wanted.

For coordinating broader efforts, we also use the scala/scala-dev tracker.

To contribute here, please open a pull request from your fork of this repository.

Be aware that we can't accept additions to the standard library, only modifications to existing code. Binary compatibility forbids adding new public classes or public methods. Additions are made to scala-library-next instead.

We require that you sign the Scala CLA before we can merge any of your work, to protect Scala's future as open source software.

The general workflow is as follows.

  1. Find/file an issue in scala/bug (or submit a well-documented PR right away!).
  2. Fork the scala/scala repo.
  3. Push your changes to a branch in your forked repo. For coding guidelines, go here.
  4. Submit a pull request to scala/scala from your forked repo.

For more information on building and developing the core of Scala, read the rest of this README, especially for setting up your machine!

Get in touch!

In order to get in touch with other Scala contributors, join the #scala-contributors channel on the Scala Discord chat, or post on contributors.scala-lang.org (Discourse).

If you need some help with your PR at any time, please feel free to @-mention anyone from the list below, and we will do our best to help you out:

username talk to me about...
@lrytz back end, optimizer, named & default arguments, reporters
@retronym 2.12.x branch, compiler performance, weird compiler bugs, lambdas
@SethTisue getting started, build, CI, community build, Jenkins, docs, library, REPL
@dwijnand pattern matcher, MiMa, partest
@som-snytt warnings/lints/errors, REPL, compiler options, compiler internals, partest
@Ichoran collections library, performance
@viktorklang concurrency, futures
@sjrd interactions with Scala.js
@NthPortal library, concurrency, scala.math, LazyList, Using, warnings
@bishabosha TASTy reader
@joroKr21 higher-kinded types, implicits, variance

P.S.: If you have some spare time to help out around here, we would be delighted to add your name to this list!

Branches

Target the oldest branch you would like your changes to end up in. We periodically merge forward from older release branches (e.g., 2.12.x) to new ones (e.g. 2.13.x).

If your change is difficult to merge forward, you may be asked to also submit a separate PR targeting the newer branch.

If your change is version-specific and shouldn't be merged forward, put [nomerge] in the PR name.

If your change is a backport from a newer branch and thus doesn't need to be merged forward, put [backport] in the PR name.

Choosing a branch

Most changes should target 2.13.x. We are increasingly reluctant to target 2.12.x unless there is a special reason (e.g. if an especially bad bug is found, or if there is commercial sponsorship).

The 2.11.x branch is now inactive and no further 2.11.x releases are planned (unless unusual, unforeseeable circumstances arise). You should not target 2.11.x without asking maintainers first.

Repository structure

Most importantly:

scala/
+--build.sbt                 The main sbt build definition
+--project/                  The rest of the sbt build
+--src/                      All sources
   +---/library              Scala Standard Library
   +---/reflect              Scala Reflection
   +---/compiler             Scala Compiler
+--test/                     The Scala test suite
   +---/files                Partest tests
   +---/junit                JUnit tests
   +---/scalacheck           ScalaCheck tests
+--spec/                     The Scala language specification

but also:

scala/
   +---/library-aux          Scala Auxiliary Library, for bootstrapping and documentation purposes
   +---/interactive          Scala Interactive Compiler, for clients such as an IDE (aka Presentation Compiler)
   +---/intellij             IntelliJ project templates
   +---/manual               Scala's runner scripts "man" (manual) pages
   +---/partest              Scala's internal parallel testing framework
   +---/partest-javaagent    Partest's helper java agent
   +---/repl                 Scala REPL core
   +---/repl-frontend        Scala REPL frontend
   +---/scaladoc             Scala's documentation tool
   +---/scalap               Scala's class file decompiler
   +---/testkit              Scala's unit-testing kit
+--admin/                    Scripts for the CI jobs and releasing
+--doc/                      Additional licenses and copyrights
+--scripts/                  Scripts for the CI jobs and releasing
+--tools/                    Scripts useful for local development
+--build/                    Build products
+--dist/                     Build products
+--target/                   Build products

Get ready to contribute

Requirements

You need the following tools:

  • Java SDK. The baseline version is 8 for both 2.12.x and 2.13.x. It is almost always fine to use a later SDK such as 11 or 15 for local development. CI will verify against the baseline version.
  • sbt

MacOS and Linux work. Windows may work if you use Cygwin. Community help with keeping the build working on Windows and documenting any needed setup is appreciated.

Tools we use

We are grateful for the following OSS licenses:

Build setup

Basics

During ordinary development, a new Scala build is built by the previously released version, known as the "reference compiler" or, slangily, as "STARR" (stable reference release). Building with STARR is sufficient for most kinds of changes.

However, a full build of Scala is bootstrapped. Bootstrapping has two steps: first, build with STARR; then, build again using the freshly built compiler, leaving STARR behind. This guarantees that every Scala version can build itself.

If you change the code generation part of the Scala compiler, your changes will only show up in the bytecode of the library and compiler after a bootstrap. Our CI does a bootstrapped build.

Bootstrapping locally: To perform a bootstrap, run restarrFull within an sbt session. This will build and publish the Scala distribution to your local artifact repository and then switch sbt to use that version as its new scalaVersion. You may then revert back with reload. Note restarrFull will also write the STARR version to buildcharacter.properties so you can switch back to it with restarr without republishing. This will switch the sbt session to use the build-restarr and target-restarr directories instead of build and target, which avoids wiping out classfiles and incremental metadata. IntelliJ will continue to be configured to compile and run tests using the starr version in versions.properties.

For history on how the current scheme was arrived at, see https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion.

Building with fatal warnings: To make warnings in the project fatal (i.e. turn them into errors), run set Global / fatalWarnings := true in sbt (replace Global with the name of a module—such as reflect—to only make warnings fatal for that module). To disable fatal warnings again, either reload sbt, or run set Global / fatalWarnings := false (again, replace Global with the name of a module if you only enabled fatal warnings for that module). CI always has fatal warnings enabled.

Using the sbt build

Once you've started an sbt session you can run one of the core commands:

  • compile compiles all sub-projects (library, reflect, compiler, scaladoc, etc)
  • scala / scalac run the REPL / compiler directly from sbt (accept options / arguments)
  • enableOptimizer reloads the build with the Scala optimizer enabled. Our releases are built this way. Enable this when working on compiler performance improvements. When the optimizer is enabled the build will be slower and incremental builds can be incorrect.
  • setupPublishCore runs enableOptimizer and configures a version number based on the current Git SHA. Often used as part of bootstrapping: sbt setupPublishCore publishLocal && sbt -Dstarr.version=<VERSION> testAll
  • dist/mkBin generates runner scripts (scala, scalac, etc) in build/quick/bin
  • dist/mkPack creates a build in the Scala distribution format in build/pack
  • junit/test runs the JUnit tests; junit/testOnly *Foo runs a subset
  • scalacheck/test runs scalacheck tests, use testOnly to run a subset
  • partest runs partest tests (accepts options, try partest --help)
  • publishLocal publishes a distribution locally (can be used as scalaVersion in other sbt projects)
    • Optionally set baseVersionSuffix := "bin-abcd123-SNAPSHOT" where abcd123 is the git hash of the revision being published. You can also use something custom like "bin-mypatch". This changes the version number from 2.13.2-SNAPSHOT to something more stable (2.13.2-bin-abcd123-SNAPSHOT).
    • Note that the -bin string marks the version binary compatible. Using it in sbt will cause the scalaBinaryVersion to be 2.13. If the version is not binary compatible, we recommend using -pre, e.g., 2.14.0-pre-abcd123-SNAPSHOT.
    • Optionally set ThisBuild / Compile / packageDoc / publishArtifact := false to skip generating / publishing API docs (speeds up the process).

If a command results in an error message like a module is not authorized to depend on itself, it may be that a global sbt plugin is causing a cyclical dependency. Try disabling global sbt plugins (perhaps by temporarily commenting them out in ~/.sbt/1.0/plugins/plugins.sbt).

Sandbox

We recommend keeping local test files in the sandbox directory which is listed in the .gitignore of the Scala repo.

Incremental compilation

Note that sbt's incremental compilation is often too coarse for the Scala compiler codebase and re-compiles too many files, resulting in long build times (check sbt#1104 for progress on that front). In the meantime you can:

  • Use IntelliJ IDEA for incremental compiles (see IDE Setup below) - its incremental compiler is a bit less conservative, but usually correct.

IDE setup

We suggest using IntelliJ IDEA (see src/intellij/README.md).

Metals may also work, but we don't yet have instructions or sample configuration for that. A pull request in this area would be exceedingly welcome. In the meantime, we are collecting guidance at scala/scala-dev#668.

In order to use IntelliJ's incremental compiler:

  • run dist/mkBin in sbt to get a build and the runner scripts in build/quick/bin
  • run "Build" - "Make Project" in IntelliJ

Now you can edit and build in IntelliJ and use the scripts (compiler, REPL) to directly test your changes. You can also run the scala, scalac and partest commands in sbt. Enable "Ant mode" (explained above) to prevent sbt's incremental compiler from re-compiling (too many) files before each partest invocation.

Coding guidelines

Our guidelines for contributing are explained in CONTRIBUTING.md. It contains useful information on our coding standards, testing, documentation, how we use git and GitHub and how to get your code reviewed.

You may also want to check out the following resources:

Scala CI

Build Status

Once you submit a PR your commits will be automatically tested by the Scala CI.

Our CI setup is always evolving. See scala/scala-dev#751 for more details on how things currently work and how we expect they might change.

If you see a spurious failure on Jenkins, you can post /rebuild as a PR comment. The scabot README lists all available commands.

If you'd like to test your patch before having everything polished for review, you can have Travis CI build your branch (make sure you have a fork and have Travis CI enabled for branch builds on it first, and then push your branch). Also feel free to submit a draft PR. In case your draft branch contains a large number of commits (that you didn't clean up / squash yet for review), consider adding [ci: last-only] to the PR title. That way only the last commit will be tested, saving some energy and CI-resources. Note that inactive draft PRs will be closed eventually, which does not mean the change is being rejected.

CI performs a compiler bootstrap. The first task, validatePublishCore, publishes a build of your commit to the temporary repository https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots. Note that this build is not yet bootstrapped, its bytecode is built using the current STARR. The version number is 2.13.2-bin-abcd123-SNAPSHOT where abcd123 is the commit hash. For binary incompatible builds, the version number is 2.14.0-pre-abcd123-SNAPSHOT.

You can use Scala builds in the validation repository locally by adding a resolver and specifying the corresponding scalaVersion:

$ sbt
> set resolvers += "pr" at "https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/"
> set scalaVersion := "2.12.2-bin-abcd123-SNAPSHOT"
> console

"Nightly" builds

The Scala CI builds nightly download releases and publishes them to https://scala-ci.typesafe.com/artifactory/scala-integration/ .

Using a nightly build in sbt is explained in this Stack Overflow answer

Although we casually refer to these as "nightly" builds, they aren't actually built nightly, but "mergely". That is to say, a build is published for every merged PR.

Scala CI internals

The Scala CI runs as a Jenkins instance on scala-ci.typesafe.com, configured by a chef cookbook at scala/scala-jenkins-infra.

The build bot that watches PRs, triggers testing builds and applies the "reviewed" label after an LGTM comment is in the scala/scabot repo.

Community build

The Scala community build is an important method for testing Scala releases. A community build can be launched for any Scala commit, even before the commit's PR has been merged. That commit is then used to build a large number of open-source projects from source and run their test suites.

To request a community build run on your PR, just ask in a comment on the PR and a Scala team member (probably @SethTisue) will take care of it. (details)

Community builds run on the Scala Jenkins instance. The jobs are named ..-integrate-community-build. See the scala/community-builds repo.

scala-dist's People

Contributors

adriaanm avatar albasile avatar anthonykirby avatar bkanuka avatar bradwright avatar dcsobral avatar dsosby avatar fdietze avatar folone avatar gkossakowski avatar gokcehan avatar hvesalai avatar jsuereth avatar kiritsuku avatar liancheng avatar lrytz avatar medovina avatar muuki88 avatar odersky avatar paulp avatar retronym avatar sayuan avatar sethtisue avatar snapcracklepopgone avatar soc avatar som-snytt avatar viniciusmiana avatar xuwei-k avatar ymasory avatar yuchangyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-dist's Issues

Move gedit language specification upstream

In order to prevent every user having to manually install the Scala language specification file in gedit, it would be great if it could be moved upstream.

This bug report is open about it upstream in gedit:
https://bugzilla.gnome.org/show_bug.cgi?id=684933

Moving it upstream requires that the language file (scala.lang, https://github.com/scala/scala-dist/blob/master/tool-support/src/gedit/scala.lang) be licenced under LGPLv2.1+.

The current licence of the file is unclear to me. If it’s not already licenced compatibly, would the authors (Gabriel Riba, fdietze, anthonykirby and Paul Phillips) mind relicencing it? Thanks!

deb packages aren't getting their data gzipped anymore

hhoughton:Downloads hhoughton$ for i in 3 4; do ar -t scala-2.13.0-M$i.deb; echo; done
debian-binary
control.tar.gz
data.tar.gz

debian-binary
control.tar.gz
data.tar

Probably caused by #180. Newer versions of sbt-native-packager pass -Znone to dpkg, because "packages are largely JARs, which are already compressed". However, the packaged scaladoc has nearly 500MB (uncompressed) of docs, which benefit greatly from compression.

I'll double-check that that's the problem, but it seems the most likely.

Thanks to @Glavo for noticing.

Emacs: syntax highlighting for functions with multiple parameter lists

The current scala-mode for emacs does not support methods or constructors with multiple parameter lists.

E.g. in the following two lines b: Int will not be highlighted properly

class Foo(a: Int)(b: Int)
def foo(a: Int)(b: Int) = a * b

NB: this used to work in earlier versions.

Emacs scala-mode compound enhancement

Hi Guys,
would take pleasure to translate some exercises realised at
https://launchpad.net/python-mode into scala-mode.

That would cover

  • having a menu-entry for every command
  • menu display command-name and short help
  • commands addressing the common syntactic forms like
    statement, block/loop, top-level etc.
  • commands taking this forms: move over, copy, execute, delete etc.

Just to make up some agenda for discuss. Please tell should be rather urgent items at your table. Will deliver specific reports when ready.

windows installer sets incorrect path

i installed scala 2.10.3, windows installer edition with default options on windows 7 (version 6.1.7600)
the windows PATH is set to C:\Program Files\scala\\bin
(look at extra )

Emacs scala-mode indent issue

Currently, the Emacs scala-mode tool has bugs on my Emacs 23.3 in Ubuntu 12.04. I am using Evil, the Vi layer on top of Emacs, but the bug happens even in normal Emacs mode. For me, this code bugs out:

object Main {
  def fibs(x : Int) = {
    stuff
  }
}

On the bracket closing fibs, if I type a newline, it would not indent and throw a (wrong-type-argument number-or-marker-p nil) error. Strangely, though, if I simply add a newline at the beginning of the entire file, there's no bug at all.

I went through the backtrace and found that it's the (char-before) at line 164 in scala-lambda-p in scala-mode-indent.el that was the problem. (char-before) returns nil if the pointer is out of range. I'm not sure why this would happen, but I've made a simple fix and it seems to work for me. Simply replace (char-before) with (preceding-char) on both lines 164 and 165. I don't believe there would be any side-effects from this, so I think this would be an easy fix. Could someone else double-check these bugs and the solution to them?

I'm somewhat new to helping out in these projects, so I'm not sure how to proceed. Should I send a pull request?

Produces deb package without scala in it

Running scala-installer/debian:package-bin produced a 2k package. This obviously doesn't have the scala distribution in it. This might be a result of scala-dist.zip being in the wrong location, but this instructions say to put it in.

~/scala/scala-dist/target/tmp/scala-dist.zip

And it was there. No warnings were produced.

gedit support not working for me

After downloading the scala.lang file to /usr/share/gtksourceview-3.0/language-specs I get the following errors:


/usr/share/gtksourceview-3.0/language-specs/scala.lang:37: parser error : Specification mandate value for attribute data-pjax-transient

(gedit:6181): GtkSourceView-WARNING **: Error reading language specification file '/usr/share/gtksourceview-3.0/language-specs/scala.lang'
/usr/share/gtksourceview-3.0/language-specs/scala.lang:37: parser error : Specification mandate value for attribute data-pjax-transient
<link data-pjax-transient rel='permalink' href='/scala/scala-dist/blob/8
^
/usr/share/gtksourceview-3.0/language-specs/scala.lang:37: parser error : attributes construct error
<link data-pjax-transient rel='permalink' href='/scala/scala-dist/blob/8
^
/usr/share/gtksourceview-3.0/language-specs/scala.lang:37: parser error : Couldn't find end of Start Tag link
<link data-pjax-transient rel='permalink' href='/scala/scala-dist/blob/8
^

(gedit:6181): GtkSourceView-WARNING **: Failed to parse '/usr/share/gtksourceview-3.0/language-specs/scala.lang'

(gedit:6181): GtkSourceView-WARNING **: Error reading language specification file '/usr/share/gtksourceview-3.0/language-specs/scala.lang'

Gedit is version 3.4.1, which is the current version for Ubuntu 12.04 LTS.

The version with gtksourceview-2.0 on my previous system worked well.

Prepare release notes for Scala 2.12.0-M2

/cc @lrytz

  • Java 8 is now mandatory. We are testing with 8u45 and recommend you use this version or later. We believe that some non deterministic failures during our early testing were due to JDK-8058847. Thanks to Vaidas Pilkauskas for 'making the connection to this bug!.
    • Show an example of the error you get when using Java 6 ("Unsupported major.minor version 52.0")
  • indylambda: recap, status, demo
  • optimizer: recap, status, todo

deprecation warnings ("object WixHelper is deprecated")

since enabling -deprecation in compiling the build definition, we're seeing:

[warn] /Users/tisue/scala-dist/project/Wix.scala:35: method generateComponentsAndDirectoryXml in object WixHelper is deprecated: Use higher level abstraction
[warn]     val (bin, binDirXml0) = generateComponentsAndDirectoryXml(stage / "bin")
[warn]                             ^
[warn] /Users/tisue/scala-dist/project/Wix.scala:36: method generateComponentsAndDirectoryXml in object WixHelper is deprecated: Use higher level abstraction
[warn]     val (doc, docDirXml)  = generateComponentsAndDirectoryXml(stage / "doc", "doc_")
[warn]                             ^
[warn] /Users/tisue/scala-dist/project/Wix.scala:37: method generateComponentsAndDirectoryXml in object WixHelper is deprecated: Use higher level abstraction
[warn]     val (lib, libDirXml)  = generateComponentsAndDirectoryXml(stage / "lib")
[warn]                             ^
[warn] /Users/tisue/scala-dist/project/Wix.scala:38: method generateComponentsAndDirectoryXml in object WixHelper is deprecated: Use higher level abstraction
[warn]     val (api, apiDirXml)  = generateComponentsAndDirectoryXml(stageApi / "api", "api_")
[warn]                             ^

it would be nice to address this, because then we could enable -Xfatal-warnings for the build definition

TextWrangler 4.5.3 does not allow adding the scala language

I have tried to use the plist file given and followed the instructions.

Nevertheless, when I start TextWrangler, the languages shown in the preferences do not include scala. In addition, TextWrangler 4.5.3 does not allow adding its own language for a given extension, or for a new extension.

Thank you in advance for your help.

syntax highlighting for unix shebangs?

This is pretty obscure, but you can run a scala script on the unix command line with a shebang header if it starts at the first line of input. These work if you do something like this at the very beginning of a program.

#!/bin/sh
exec scala -Xscript -Xlint -optimise -J-Xmx3g "$0" "$@" 
!#

Would it be easy to make a syntax highlighting thing where everything between the #! and !# if they are at the beginning of a line, and start on the first line of a program, are colored like a comment or something? That would be a nice addition.

Large installation size

Currently, docs are distributed with the main release, making it particularly heavy. (~470MB)
I suggest extracting the docs to a separate package (scala-doc).

three Travis-CI failures in a row ("object scala.runtime in compiler mirror not found" on sisu-guice JAR)

seen at e.g. https://travis-ci.org/scala/scala-dist/builds/396107083

[info] Compiling 5 Scala sources to /home/travis/build/scala/scala-dist/project/target/scala-2.10/sbt-0.13/classes...
[error] error while loading <root>, /home/travis/.ivy2/cache/org.sonatype.sisu/sisu-guice/jars/sisu-guice-3.1.0-no_aop.jar (Permission denied)
scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
	at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
	at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
	at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:172)
	at scala.reflect.internal.Mirrors$RootsBase.getRequiredPackage(Mirrors.scala:175)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage$lzycompute(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage(Definitions.scala:183)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass$lzycompute(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass(Definitions.scala:184)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr$lzycompute(Definitions.scala:1024)
	at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr(Definitions.scala:1023)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1153)
	at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
	at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1290)
	at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:106)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:107)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:53)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
	at sbt.inc.Incremental$.compile(Incremental.scala:71)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:155)
	at sbt.Compiler$.compile(Compiler.scala:141)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:927)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:918)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:916)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[error] (compile:compileIncremental) scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

move to newer sbt-native-packager?

we are leaving 2.11.x frozen at an old version, even for 2.11.9, in the interest of stability

Scala 2.12.0 was released using sbt-native-packager 1.0.6. so far, we haven't received any reports of regressions, knock on wood.

it's tempting to keep pushing forward to newer versions for 2.12.x, but it's also tempting to just leave it alone and figure we'll move to 1.1.0 or newer for Scala 2.13. we don't RC minor Scala releases anymore, so that argues for staying on 1.0.6 for a while, since there isn't a chance for users to catch regressions until after the release is already out the door. so that's my current leaning, is delay any upgrade until 2.13

cc @muuki88

rpm available at official site has discrepancy between metadata vs filename

I have downloaded the rpm from this page:
https://www.scala-lang.org/download/2.10.4.html

this is the link to the file: https://www.scala-lang.org/files/archive/scala-2.10.4.rpm
What I did:

  1. pushed the file under path/to/dir in artifactory.
  2. configured a scala.repo file with baseurl=$artifactory_url/repo/simple/path/to/dir
  3. added scala.repo file with yum-config-manager --add-repo scala.repo
  4. refreshed metadata yum clean all && yum makecache
  5. tried installing with sudo yumdownloader --resolve scala
  6. at the point where should download I'm getting an error.

Loaded plugins: product-id
--> Running transaction check
---> Package scala.noarch 0:2.10.4-400 will be installed
--> Finished Dependency Resolution
scala-2.10.4.rpm               FAILED.
http://myserver.local:8081/artifactory/simple/scala-local/2.10.4/2.10.4/RPMS/scala-2.10.4.rpm: [Errno 14] HTTP Error 404 - Not Found                                    ]  0.0 B/s |    0 B  --:--:-- ETA
Trying other mirror.

To address this issue please refer to the below knowledge base article


https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

scala-2.10.4-400.noarch: [Errno 256] No more mirrors to try.

Further investigation shows the version is not 2.10.4, but 2.10.4-400, and there is architecture tag set to noarch, and the rpm original file name should have been scala-2.10.40-400.noarch.rpm
After renaming the file to that, and reuploading it to artifactory, refreshing the metadata there and locally, package installs. ok.

I expect the fact the "nice" file name is used - is the root cause.
If you want to publish with this nice name, you have to match the metadata.

emacs Syntax highlighting missed end of comments: /* **/

I've encountered this issue with the file project/Sbt.scala in sbt. The syntax
highlighting misses the end of comments of the form /* **/ so that the rest of
the file is highlighted as comment.

This can be reproduced with a two liner scala file:
/* **/
val hello="world"

Regards, Thomas Koch

.deb lintian issues

From https://bugs.launchpad.net/ubuntu/+source/scala/+bug/1126035/comments/9:

It works as a workaround, but the quality of the upstream package is bad:

$ lintian Downloads/scala-2.11.0.deb
W: scala: control-file-is-empty conffiles
W: scala: copyright-without-copyright-notice
E: scala: description-starts-with-package-name
E: scala: maintainer-address-missing LAMP/EPFL and Typesafe, Inc.
E: scala: depends-on-obsolete-package depends: openjdk-6-jre
W: scala: symlink-should-be-relative usr/bin/fsc /usr/share/scala/bin/fsc
W: scala: symlink-should-be-relative usr/bin/scala /usr/share/scala/bin/scala
W: scala: symlink-should-be-relative usr/bin/scalac /usr/share/scala/bin/scalac
W: scala: symlink-should-be-relative usr/bin/scaladoc /usr/share/scala/bin/scaladoc
W: scala: symlink-should-be-relative usr/bin/scalap /usr/share/scala/bin/scalap
W: scala: extra-license-file usr/share/doc/scala/LICENSE.md
W: scala: extra-license-file usr/share/doc/scala/License.rtf
W: scala: embedded-javascript-library usr/share/doc/scala/api/scala-compiler/lib/jquery.js

After that, Lintian just hangs (which makes it impossible to install it using software center).

Indentation in scala vim files

Shouldn't the scala vim files (tool-support/src/vim) set the shiftwidth and tabstop to 2? I could be way off here, I'm not sure how this is usually done. It does seem appropriate though, since the default indentation in scala is 2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.