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

10.2.0 has an issue with compiling node-gyp #1884

Merged
merged 21 commits into from
Jan 21, 2020
Merged

Conversation

KrisGraySFDC
Copy link
Contributor

@KrisGraySFDC KrisGraySFDC commented Jan 17, 2020

What does this PR do?

Addresses a compile error during npm install.
This PR updates the following dependencies:

  • Use of nodejs v12.4.0
  • npm v6.9.0
  • vscode versions 1.40 and above
  • mocha 5
  • sinon 7.3.1

What issues does this PR fix or reference?

See this issue relating to 10.2.0
nodejs/node#20921

@W-7138332@

@KrisGraySFDC KrisGraySFDC requested a review from lcampos January 17, 2020 02:00
@KrisGraySFDC
Copy link
Contributor Author

You don't see the issue after its initially installed, so anyone setup on the repo doesn't notice. I'm doing it from scratch which is why I noticed.

@codecov
Copy link

codecov bot commented Jan 17, 2020

Codecov Report

Merging #1884 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #1884   +/-   ##
=======================================
  Coverage     72.1%   72.1%           
=======================================
  Files          227     227           
  Lines         8478    8478           
  Branches       965     965           
=======================================
  Hits          6113    6113           
  Misses        2138    2138           
  Partials       227     227
Impacted Files Coverage Δ
.../salesforcedx-vscode-visualforce/src/tagClosing.ts 0% <ø> (ø) ⬆️
...forcedx-vscode-core/src/channels/channelService.ts 83.33% <0%> (-2.39%) ⬇️
...forcedx-apex-replay-debugger/src/messages/index.ts 50% <0%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbe9505...63617d8. Read the comment docs.

@lcampos
Copy link
Contributor

lcampos commented Jan 17, 2020

@KrisGraySFDC thanks for opening this, we didn't know this was the origin of the test failures we started seeing last night. I'll cherry-pick and add other changes to this PR that are needed for circleci & appveyor.

@KrisGraySFDC
Copy link
Contributor Author

Cool, thanks Luis.

Should I close this one now then?

@lcampos
Copy link
Contributor

lcampos commented Jan 17, 2020

Cool, thanks Luis.

Should I close this one now then?

No, let's keep this open and use it to make all the changes

@@ -55,7 +55,8 @@
},
"license": "BSD-3-Clause",
"dependencies": {
"node": "10.2.0"
"node": "12.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

VSCode ships with node 10.11.0 in version 1.39 before that they were shipping with node 10.2.0. In the latest vscode versions (1.40 and above) they moved to node 12.4.0 starting on version 1.40

@@ -6,7 +6,7 @@
"publisher": "salesforce",
"license": "BSD-3-Clause",
"engines": {
"vscode": "^1.32.0"
"vscode": "^1.40.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Updating the extensions to be used on VSCode versions 1.40 and above, most users are already on those versions.

KrisGraySFDC and others added 20 commits January 20, 2020 17:20
…ejs v12.4.0 and update @types/node version
…ration tests. Disable lerna ci on appveyor
@@ -20,22 +20,22 @@
"webpack-cli": "3.3.5"
},
"scripts": {
"postinstall": "lerna bootstrap -- --no-package-lock && node scripts/reformat-with-prettier",
"bootstrap": "lerna bootstrap -- --no-package-lock && node scripts/reformat-with-prettier",
"postinstall": "lerna bootstrap --no-ci -- --no-package-lock && node scripts/reformat-with-prettier",
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding --no-ci to prevent running as npm ci which requires lock files or npm-shrinkwrap.json being present.

"test:vscode-insiders-integration": "lerna exec --concurrency 1 --stream --bail=false -- npm run test:vscode-insiders-integration",
"test:without-system-tests": "lerna exec --ignore system-tests --concurrency 1 --stream --bail=false -- npm run test",
"test:system-tests": "lerna run test --scope system-tests --concurrency 1 --stream",
"test": "lerna exec --concurrency 1 --stream --bail=false -- npm run test --if-present",
Copy link
Contributor

Choose a reason for hiding this comment

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

Running with --if-present removes the build errors seen when lerna would try to run npm scripts that are not present in certain modules.

@@ -45,8 +45,8 @@
"watch": "tsc -watch -p .",
"clean": "shx rm -rf node_modules && shx rm -rf out && shx rm -rf coverage && shx rm -rf .nyc_output",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "./node_modules/.bin/cross-env VSCODE_NLS_CONFIG={} ./node_modules/.bin/nyc ./node_modules/.bin/_mocha --recursive out/test/unit --reporter mocha-multi-reporters --reporter-options configFile=../../config/mochaUnitTestsConfig.json",
"test:integration": "./node_modules/.bin/cross-env VSCODE_NLS_CONFIG={} ./node_modules/.bin/nyc ./node_modules/.bin/_mocha --recursive out/test/integration --reporter mocha-multi-reporters --reporter-options configFile=../../config/mochaIntegrationTestsConfig.json"
"test:unit": "node ./node_modules/nyc/bin/nyc.js ./node_modules/mocha/bin/_mocha --recursive out/test/unit --exit --reporter mocha-multi-reporters --reporter-options configFile=../../config/mochaUnitTestsConfig.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

Had to update to using the direct module references since CircleCI Windows was not properly able to reference the dependencies when using node_modules/.bin/...

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not know enough about this piece - do you know why this part isn't needed for test:unit? ./node_modules/cross-env/dist/bin/cross-env.js VSCODE_NLS_CONFIG={}. I know VSCODE_NLS_CONFIG is used for localization

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it's because when we run integration tests we spin up a local instance of vscode that we later use to run the tests on. We need it since those tests have direct references to vscode apis, etc. For unit tests we do not do that cause we don't have any dependencies with vscode at the test level.

@@ -213,7 +213,7 @@ describe('SObject faux class generator', () => {

// seems odd, but this can happen due to the childRelationships that don't have a relationshipName

it('Should create a class that has no duplicate field names', async () => {
/* it('Should create a class that has no duplicate field names', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Commenting out for now, will log a work item to take care of this in a follow up PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

How critical is this piece if there is a regression here? I'm wondering if we should prioritize it before the release.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is important enough that my follow up PRs are going to be around fixing these type of issues. I just didn't want to delay merging most of the changes and prevent this PR from getting more complex.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why was the test failing?

Copy link
Contributor

Choose a reason for hiding this comment

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

The failure came from the results not including List<Case> Reference;, the other test was also missing something from being included in the results.

@@ -1,3 +1,4 @@
#!/usr/bin/env node
Copy link
Contributor

Choose a reason for hiding this comment

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

Small tweaks to make the script run successfully on Windows even when there's some execution failures.

@lcampos lcampos merged commit 5473853 into develop Jan 21, 2020
@lcampos lcampos deleted the fix-compile-error branch January 21, 2020 23:19
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