Skip to content
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

'signModule.signed' does not support lazy evaluation #50

Closed
benmusson opened this issue Aug 6, 2024 · 4 comments
Closed

'signModule.signed' does not support lazy evaluation #50

benmusson opened this issue Aug 6, 2024 · 4 comments
Assignees

Comments

@benmusson
Copy link
Contributor

Goal: I would like to lazily access the output file produced by the signModule task.

val releaseFiles: Configuration by configurations.creating {
    isCanBeConsumed = true
    isCanBeResolved = false
}

afterEvaluate {
    artifacts.add(releaseFiles.name, tasks.signModule.flatMap { it.signed })
}

Error Recieved:

> Querying the mapped value of task ':modules:charts:signModule' property 'unsigned' before task ':modules:charts:zipModule' has completed is not supported

I believe there is something wrong with the dependency chain of the signed property, causing it to prematurely stop between the zipModule and signModule tasks.

@benmusson
Copy link
Contributor Author

Suggested fix: #51

@benmusson
Copy link
Contributor Author

This repo demonstrates the issue: https://github.com/benmusson/ignition-module-tools-issue50

With v0.3.0:

PS D:\Projects\Ignition Modules\ignition-module-tools-issue50> ./gradlew printSignedModulePath      
Configuration on demand is an incubating feature.
Type-safe project accessors is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'ignition-module-tools-issue50'.
> Could not create task ':printSignedModulePath'.
   > Querying the mapped value of map(task ':signModule' property 'unsigned') before task ':zipModule' has completed is not supported

With #51:

PS D:\Projects\Ignition Modules\ignition-module-tools-issue50> ./gradlew printSignedModulePath
Configuration on demand is an incubating feature.
Type-safe project accessors is an incubating feature.
D:\Projects\Ignition Modules\ignition-module-tools-issue50\build\ignition-module-tools-issue50.modl

BUILD SUCCESSFUL in 1s
4 actionable tasks: 1 executed, 3 up-to-date

@brianeray brianeray self-assigned this Aug 9, 2024
@brianeray
Copy link
Collaborator

For internal tracking: IGN-10611.

@brianeray
Copy link
Collaborator

Fixed by #55.

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

No branches or pull requests

2 participants