Comments (15)
the compiler interface is cached at:
~/.ivy2/cache/org.scala-sbt/org.scala-sbt-compiler-interface-0.13.12-bin_2.10.6__52.0/
to cause it to be rebuilt
rm ~/.ivy2/cache/org.scala-sbt/org.scala-sbt-compiler-interface-0.13.12-bin_2.10.6__52.0 -r
rm ~/.sbt -r
rm target -r
from sbtix.
The compiler interface is compiled by Zinc. The "not yet compiled" message originates here:
https://github.com/sbt/zinc/blob/f87221c25d8c543dad47fd029e44bba93bf6a5fb/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/AnalyzingCompiler.scala#L149
from sbtix.
Example of how to compile the Compiler Interface Jar:
Base class for test suites that must be able to fetch and compile the compiler bridge.
from sbtix.
The Sbtix global plugin should supply a command that allows one to build the compiler bridge against a given project. Maybe 'sbtix-gen-bridge'.
from sbtix.
Hm. Couldn't we make this a separate derivation instead of doing this outside of Nix?
from sbtix.
I think we'd need three components.
- An sbtix command to gather the inputs. Mainly the
ScalaVersion
that the bridge is targeting, thescalaCompilerBridgeSource
and maybe some information frombootIvyConfiguration
. A separate command initially, but eventually part ofsbtix-gen
after the repo.nix files get merged and some of the other commands are discarded. - A tool, maybe as a separate sbt project from the Sbtix plugin that compiles the jar for the compiler-bridge using the gathered inputs.
- A derivation that given the gathered inputs will use the tool to build the compiler bridge. The output jar from this derivation can then be an input to the user's sbt project, and should only need to be built the first time
nix-build
is executed.
from sbtix.
sbt seems to be interfacing with Zinc to create the compiler bridge here:
https://github.com/sbt/sbt/blob/57a655478f2fdf1de3e90acf2755b50c0459fd50/main-actions/src/main/scala/sbt/Compiler.scala#L128
from sbtix.
this project seems to be attempting something similar, though it is a year old: https://github.com/Duhemm/compiler-bridge
Though I don't think I like its approach of gutting SBT to do this.
from sbtix.
running inspect compile
and following it's dependencies lead me to compile:compileIncremental
and compile:compile::compileInputs
.
compile:compileIncremental
- builds the compiler bridge without building the project.
from sbtix.
(compileInputs in compile).value
and scalaCompilerBridgeSource.value
may provide additional dependencies currently provided by the manual-repo
from sbtix.
scalaCompilerBridgeSource.value (sbt version), java version, and scala version are the inputs that determine the compiler-bridge jar.
from sbtix.
compiler-interface is used in SBT 0.13 and 1.0
compiler-bridge is only used in sbt 1.0
I had been getting the two confused. Much of my information applies to sbt 1.0 and not sbt 0.13.
In sbt 0.13 scalaCompilerBridgeSource.value gives the compiler-interface
module, while in 1.0 it gives the compiler-bridge
module
from sbtix.
sbt 0.13 compiles the compiler-interface here:
https://github.com/typesafehub/zinc/blob/2fc849c7fdf36341f0a9ede02e6827d82fa71282/src/main/scala/com/typesafe/zinc/Compiler.scala#L148
from sbtix.
In sbt 0.13 the ComponentCompiler that compiles the interface is here: https://github.com/sbt/sbt/blob/v0.13.12/compile/ivy/src/main/scala/sbt/compiler/ComponentCompiler.scala#L29
from sbtix.
Use this repo for searching sbt 0.13: https://github.com/sbt/sbt-zero-thirteen
from sbtix.
Related Issues (20)
- POMs are not cached by genNix
- Plugins are not handled by Sbtix yet HOT 7
- Can't access private repository HOT 6
- POM download fails with https CA error HOT 10
- SBT launcher throws exception in NixOs on nix-build HOT 11
- Reduce the dependency on the bootstrap
- Sbtix fails to add parent .pom artifacts to repo.nix files HOT 2
- Unable to resolve sbtix plugin HOT 20
- sbtix-gen-* crashes when nix-daemon is enabled HOT 6
- Better way to build libraries HOT 2
- buildSbtProject respects global plugins (and settings?)
- Feature requests to improve DX of this tool HOT 6
- Document buildSbtLibrary
- Get rid of Nix dependency HOT 6
- sbtix commands are unuseable within nix-shell HOT 2
- Have nix-build trigger regeneration of repo.nix files. HOT 2
- Update to SBT 1.1.x HOT 15
- Get rid of manual-repo.nix HOT 2
- `genNix` task hangs when run on the `Sbtix` project HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbtix.