Skip to content

Conversation

@adam-enko
Copy link
Contributor

Allow npmInstall to be cached (helps with #81)

  • test for NPM install caching,
  • add tests for npmInstall task caching
  • add test fixture project for npmInstall caching

For demonstration purposes, I commented-out the overlapping outputs in NpmInstallTask. This will have knock-on effects that I haven't tackled - I just wanted to demonstrate what it would take to get my test working.

…NpmInstallTask

- add tests for `npmInstall` task caching
- add test fixture project for `npmInstall` caching
Copy link
Member

@deepy deepy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing an initial review of the changes, but because of the issues listed in #81 (comment) we probably can't merge this

By probably I mean unless someone can make a compelling argument for why we want to support this and would be prepared to spend a little time looking at the test setup

//@Optional
//@OutputFile
@Internal
protected fun getPackageLockFileAsOutput(): File? {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing the @Optional @OutputFile you probably want to follow the pattern below
i.e. add a configurable flag for which behaviour and if it's set to the new behaviour then just return null here immediately

(Though at that point I suspect all the output methods might need to be reworked slightly, but that's boring tedious work and you can happily leave that to the maintainers)

@adam-enko
Copy link
Contributor Author

Closing, because I've since thought of a better approach #81 (comment)

@adam-enko adam-enko closed this Jun 11, 2025
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.

2 participants