-
Notifications
You must be signed in to change notification settings - Fork 136
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
Fix - use resourcesDir in package command #519
Conversation
192b8c4
to
2c0a2de
Compare
2c0a2de
to
0ee8267
Compare
if (os.exists(path)) | ||
Right(path) | ||
else | ||
Left(new NoResourcePathFoundError(path)) |
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.
For later: maybe this could be reported as a warning instead.
...ild/src/main/scala/scala/build/preprocessing/directives/UsingResourcesDirectiveHandler.scala
Outdated
Show resolved
Hide resolved
...ild/src/main/scala/scala/build/preprocessing/directives/UsingResourcesDirectiveHandler.scala
Outdated
Show resolved
Hide resolved
path | ||
else { | ||
System.err.println(s"Provided resource directory path doesn't exist: $path") | ||
sys.exit(1) |
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.
Do we really want to do that? This should be reported as an error later on by the NoResourcePathFoundError
above, right?
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 will not be reported as the error handling above only applies to directives.
modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala
Outdated
Show resolved
Hide resolved
64a7fb5
to
dbbc24a
Compare
.sequence | ||
.map(_.flatten) | ||
} | ||
val mainClassOpt = preprocessedSources.flatMap(_.mainClassOpt.toSeq).headOption |
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 wasn't' necessary to run directive processing for mainClass because it was done before in preprocessedSources
.
I had a problem that the warning logging for the main class was printed twice.
dbbc24a
to
4473860
Compare
059e03e
to
a4e2044
Compare
a4e2044
to
e217336
Compare
Due to a bug in the bloop #1631, scala-cli have to copy resources to
classesDir
.I also added exporting resources as
unmanagedResourceDirectories
in Sbt.