Distinguish between compile-time and runtime classpaths
See original GitHub issueCurrently, Bloop doesn’t make any distinction between compilation-time and runtime classpaths. This situation brings several problems for projects that expect to have different runtime and compile-time classpath:
- Some code may compile in Bloop, but not in the tool that generated the config (for instance, my code references a symbol that appears only on my runtime classpath)
- Some code may compile in the tool that generated the config, but not in Bloop (for instance, a name became ambiguous because of 2 wildcard imports)
- We cannot faithfully represent builds that use Gradle’s
api
vsimplementation
, sbt’sProvided
or Pants’strict_deps
for instance.
The Bloop configuration file should include different fields for these different classpaths. Finally, Bloop should use the right classpath to perform the right action.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Runtime Classpath vs Compile-Time Classpath
compile-time classpath. Contains the classes that you've added in your IDE (assuming you use an IDE) in order to compile your code. ·...
Read more >Compile time vs Run time Dependency - Java - Stack Overflow
Compiletime dependencies are only the dependencies (other classes ) which you use directly in the class you're compiling.
Read more >How is CompileTime classpath different from RunTime ...
What is a Classpath? Classpath refers to the Path where all the classes/jars are available. What is Compile-time classpath? This classpath has ...
Read more >Runtime Classpath vs Compile-Time Classpath - DZone
compile-time classpath. Contains the classes that you've added in your IDE (assuming you use an IDE) in order to compile your code. ·...
Read more >Runtime vs. Compile Time | Baeldung on Computer Science
Compile time is the period when the programming code (such as C#, Java, C, Python) is converted to the machine code (i.e. binary...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not if we intern them. In fact, we don’t need to intern them manually,
Paths.get
interns them right when they are created at parsing time.Yes, but let’s call it
classpath
.I like the fact that you scope it to the JVM platform. It eases some of my concerns with this approach and I could make my peace with a
classpath
field added under runtime JVM platform. This would mean we would add aresources
field there too.But note that you cannot encode it as
extraClasspath
because the runtime and compile classpath can be disjoint sets of URIs. You can add new URIs to the compile classpath as well as you can remove them or even change the order of the URIs. So if you want to encode the extra classpath to avoid repeating some of the URI entries in the compile classpath and save space, we need a way for you to express that.