Skip to content

feat: expose configuration to fail on invalid ATs, closes #344#376

Open
Toffikk wants to merge 5 commits intoPaperMC:mainfrom
CraftCanvasMC:feat/fail-on-invalid-ats
Open

feat: expose configuration to fail on invalid ATs, closes #344#376
Toffikk wants to merge 5 commits intoPaperMC:mainfrom
CraftCanvasMC:feat/fail-on-invalid-ats

Conversation

@Toffikk
Copy link
Contributor

@Toffikk Toffikk commented Jan 25, 2026

No description provided.

@Toffikk Toffikk force-pushed the feat/fail-on-invalid-ats branch from 2a434a1 to c156df8 Compare January 25, 2026 16:33
@Toffikk
Copy link
Contributor Author

Toffikk commented Jan 25, 2026

lmk if this is something that perhaps should be attached to the updatingMinecraft extension or even directly linked to the oldPaperCommit property

@Toffikk Toffikk force-pushed the feat/fail-on-invalid-ats branch from b8dba00 to adf6f62 Compare January 25, 2026 16:43
outputPath,
atFile.path,
atWorkingDir.path,
validate = validateAts.get(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 setupMacheResources task which uses the same task but doesn't specify ATs and i saw no point in wiring the validation property to it if no ats are gonna be applied anyway.

at,
temporaryDir.toPath().resolve("jst_work"),
singleFile = true,
validate = false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

action.execute(updatingMinecraft)
}

val validateAts: Property<Boolean> = objects.property<Boolean>().convention(false)
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant