-
-
Notifications
You must be signed in to change notification settings - Fork 964
7.0.0-RC2 - PROJECT_TARGET_DIR is never used or set. #15127
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
base: 7.0.x
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -427,6 +427,7 @@ class GrailsGradlePlugin extends GroovyPlugin { | |
@CompileStatic | ||
protected String configureGrailsBuildSettings(Project project) { | ||
System.setProperty(BuildSettings.APP_BASE_DIR, project.projectDir.absolutePath) | ||
System.setProperty(BuildSettings.PROJECT_TARGET_DIR, project.layout.buildDirectory.get().asFile.name) | ||
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. Going back to April 2024, this never appears to have been set previously. Why set it now? 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. I don't believe this is needed because configureForkSettings copies any grails property and sets it on javaexec / test. 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. @jdaugherty the 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. We haven't allowed that to be set since the retirement of the original grails build configuration. What's the use case for this? I'm not saying we shouldn't allow this, but for 7.0.0 it's a feature, not a bug. My concern is scope for 7.0.0 release. 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. @jdaugherty the reason I am calling it a bug is because it results in an exception |
||
} | ||
|
||
@CompileDynamic | ||
|
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.
What's the use case for having this set? The reason we removed PROJECT_TARGET_DIR is because it wasn't used. You can easily inject this via gradle, and BuildSettings is really a left over artifact from the original grails build system. We are trying to remove this functionality over time since it's specific to dev mode and gradle is the better place for that logic.
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 is a breaking change too. Going back to 3/29/24 in the logs, this never overrode TARGET_DIR.
Uh oh!
There was an error while loading. Please reload this page.
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.
If you set a buildDir via gradle in anything other than build, bootRun fails.
@jdaugherty how is it breaking? if it is not set, it reverts to the way it was previously.
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's a breaking change b/c it didn't previously behave like this. We're introducing a function here and I still am not clear why we need to support this. Why do we need to support a custom build directory? We're trying to remove BuildSettings.groovy completely in the longer run.
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.
@jdaugherty because you shouldn't hard code
build
. It is not a guaranteed directory name and customizable by gradle. This doesn't have to go in 7.0.0. This is just trying to fixjava.io.FileNotFoundException: /grails-demo/build/.grailspid (No such file or directory)
which is caused because build directory is not automatically created.