-
-
Notifications
You must be signed in to change notification settings - Fork 65
feat: expose configuration to fail on invalid ATs, closes #344 #376
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: main
Are you sure you want to change the base?
Changes from 4 commits
c156df8
adf6f62
c635f8e
456e779
42182b2
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 |
|---|---|---|
|
|
@@ -69,6 +69,10 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { | |
| @get:Input | ||
| abstract val oldPaperCommit: Property<String> | ||
|
|
||
| @get:Optional | ||
| @get:Input | ||
| abstract val validateAts: Property<Boolean> | ||
|
|
||
| @get:Nested | ||
| val ats: ApplySourceATs = objects.newInstance() | ||
|
|
||
|
|
@@ -182,6 +186,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { | |
| outputPath, | ||
| atFile.path, | ||
| atWorkingDir.path, | ||
| validate = validateAts.get(), | ||
|
Contributor
Author
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. This is guaranteed not to fail as this piece of code won't run if there is no at file specified and right now if the at file gets specified, this property also gets set. The property was marked as optional due to the |
||
| ) | ||
| if (!oldPaperCommit.isPresent) { | ||
| commitAndTag(git, "ATs", "paper ATs") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,6 +258,7 @@ abstract class RebuildFilePatches : JavaLauncherTask() { | |
| at, | ||
| temporaryDir.toPath().resolve("jst_work"), | ||
| singleFile = true, | ||
| validate = false, | ||
|
Contributor
Author
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. should this be made to always validate? the new AT lines should never be inapplicable but if such a situation were to happen it would be nice for it to blow up during saving them instead of failing during apply |
||
| ) | ||
| println("NEW: " + decomp.readText()) | ||
| } | ||
|
|
||
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.
maybe it'd be good for this to be on by default?