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

NPM Install caching #301

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adam-enko
Copy link

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

// does this output overlap with getNodeModulesFiles()?
//@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)

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.

None yet

2 participants