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

[BUG] Yarn hoisting behaviour depends on plugin installation order #642

Closed
ethan-sargent opened this issue Aug 17, 2023 · 1 comment · Fixed by #776
Closed

[BUG] Yarn hoisting behaviour depends on plugin installation order #642

ethan-sargent opened this issue Aug 17, 2023 · 1 comment · Fixed by #776

Comments

@ethan-sargent
Copy link

ethan-sargent commented Aug 17, 2023

Description

We are installing multiple plugins into the Salesforce CLI which uses this plugin.

Currently, it seems that changing the order we install plugins in changes yarn's hoisting behaviour, which can cause incorrect module versions to be required in a plugin.

Expected behaviour

The order plugins are installed should not cause changes in execution behaviour.

Current behaviour

The order plugins are installed causes dependencies to be incorrectly required, potentially causing significantly different behaviour depending on installation order.

Screenshots

Failure case:
image

Success case:
image

Steps to reproduce

Success case Dockerfile:

FROM node:18
RUN npm install -g @salesforce/cli 
RUN sf plugins install @salesforce/sfdx-scanner && \
    sf plugins install @salesforce/plugin-packaging && \
    sf plugins install @salesforce/plugin-community && \
    echo y | sf plugins install sfdx-git-delta && \
    sf plugins install sfdmu && \
    sf plugins install @salesforce/plugin-signups

Failure case Dockerfile:

FROM node:18
RUN npm install -g @salesforce/cli 
RUN sf plugins install @salesforce/sfdx-scanner && \
    sf plugins install @salesforce/plugin-packaging && \
    sf plugins install @salesforce/plugin-community && \
    sf plugins install @salesforce/plugin-signups && \
    sf plugins install sfdmu && \
    echo y | sf plugins install sfdx-git-delta

Build the dockerfiles and run any command from the @salesforce/sfdx-scanner plugin.

Command used when debugging this was sfdx scanner:rule:add --language xml --path temp.xml.

sfdx version information:

 CLI Version:
	@salesforce/cli/2.4.10

 Architecture:
	linux-x64

 Node Version:
	node-v18.17.1

 Plugin Version:
	@oclif/plugin-autocomplete 2.3.6 (core)
	@oclif/plugin-commands 2.2.21 (core)
	@oclif/plugin-help 5.2.16 (core)
	@oclif/plugin-not-found 2.3.36 (core)
	@oclif/plugin-plugins 3.2.0 (core)
	@oclif/plugin-search 0.0.22 (core)
	@oclif/plugin-update 3.1.30 (core)
	@oclif/plugin-version 1.3.8 (core)
	@oclif/plugin-warn-if-update-available 2.0.46 (core)
	@oclif/plugin-which 2.2.29 (core)
	@salesforce/cli 2.4.10 (core)
	apex 2.3.10 (core)
	auth 2.8.12 (core)
	community 2.3.11 (user)
	data 2.5.5 (core)
	deploy-retrieve 1.17.2 (core)
	info 2.6.38 (core)
	limits 2.3.29 (core)
	login 1.2.25 (core)
	org 2.9.30 (core)
	packaging 1.22.2 (user)
	schema 2.3.22 (core)
	settings 1.4.24 (core)
	signups 1.4.33 (user)
	sobject 0.2.2 (core)
	source 2.10.30 (core)
	telemetry 2.2.5 (core)
	templates 55.5.9 (core)
	trust 2.5.4 (core)
	user 2.3.28 (core)
	@salesforce/sfdx-scanner 3.15.0 (user)
	sfdmu 4.30.0 (user)
	sfdx-git-delta 5.24.2 (user)

 OS and Version:
	Linux 6.4.7-200.fc38.x86_64

 Shell:
	bash

 Root Path:
	/usr/local/lib/node_modules/@salesforce/cli
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale No recent activity. label Mar 23, 2024
@mdonnalley mdonnalley removed the stale No recent activity. label Mar 25, 2024
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 a pull request may close this issue.

2 participants