-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add bin folders of dependencies to the classpath when they're open in the workspace #2094
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -543,8 +543,10 @@ public static PathConfig fromSourceProjectRascalManifest(ISourceLocation manifes | |
switch (mode) { | ||
case INTERPRETER: | ||
srcsWriter.appendAll(childConfig.getSrcs()); | ||
libsWriter.append(childConfig.getBin()); | ||
break; | ||
case COMPILER: | ||
// FIXME (?): Add something to `srcsWriter` here? | ||
libsWriter.append(setTargetScheme(projectLoc)); | ||
break; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Davy asked to be mindful of possible similar changes for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No the compiler never uses libraries from source positions. That's the main difference between interpreter and compiler mode. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the important feature of the Compiler to be able to work with binary dependencies. It's also important to keep a "single source of truth" , the exact bill of materials, for library dependencies: we never depend on both the source and the binary ofa library. |
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be conceptually nicer (?) to:
bin
field fromISourceLocation
toList<ISourceLocation>
(and rename the field tobins
)bin
locations from the dependencies to that listBut, I expect this will touch a lot more places in the existing code, so I thought I'd go for the solution with the smallest footprint first...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bin folder must be in one place; this follows the target folder convention in other build systems like mvn. Also it is required to be unambiguous and unique, because this is what ends up being packaged into a runtime module like a jar or zip or doll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this does the trick! Surgical precision 👍