Skip to content

Conversation

@labkey-susanh
Copy link
Contributor

@labkey-susanh labkey-susanh commented Nov 5, 2024

Rationale

Our default configuration for modules using npm is to have each module act independently, using its own downloaded version of node and npm. We have a good number of modules using npm, so this leads to our having lots of redundant copies of these binaries in play while developing. We recently removed support for standalone module building, so there is no real compelling case for the current default configuration (except that it is the default for the third-party plugin and generally what is recommended when using a non-default value has issues). We've also recently seen builds failing when trying to download the binaries for some of the modules that are built later in the build process. Though we don't know that it is because of our downloading the binaries multiple times, we also don't know that that isn't the cause.

This PR adds two optional properties (useServerNode and useOwnNode) to make it possible to experiment with a common configuration for that downloaded node and npm binaries.

  • If neither property is defined, each module using node downloads its own copy of node and npm in the default .gradle directory for the module
  • If useServerNode is defined, the download directory is specified as <enlistment root>/.node
  • When useServerNode is defined, a module that defines useOwnNode will revert to the default behavior
    If any modules need to be differently configured (with a different version of node or a different working directory), they can still do so by setting up their own configuration of the npm extension. This is an incubating feature because having all modules use the server binaries doesn't seem to always work for reasons that I cannot discern and I need to move on with other things at the moment.

We also remove the configurations related to yarn tasks since we do not anticipate having any projects using yarn.

Related Pull Requests

Changes

  • Update to Gradle 8.11.1
  • Remove usage of deprecated dependencyProject
  • Remove configuration of Yarn tasks and properties
  • Fix directory for deployModule task
  • Add optional properties useServerNode and useOwnNode for configuring NpmRun (incubating)

@labkey-susanh labkey-susanh changed the title Update configurations for node plugin to use a single version of binaries; remove yarn configurations Add properties for updating configurations of the node plugin to use a single version of binaries; remove yarn configurations Dec 17, 2024
@labkey-susanh labkey-susanh merged commit 494f4ec into develop Dec 27, 2024
1 check passed
@labkey-susanh labkey-susanh deleted the fb_nmpSetupUpdates branch December 27, 2024 15:24
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.

4 participants