Skip to content

Remove legacy extensions compilation from build - #77058

Merged
João Moreno (joaomoreno) merged 2 commits into
masterfrom
joao/build-extensions
Jul 10, 2019
Merged

João Moreno (joaomoreno) merged 2 commits into
masterfrom
joao/build-extensions

Conversation

@joaomoreno

Copy link
Copy Markdown
Contributor

Johannes Rieken (@jrieken) The following changes did it:

  • Update vscode-nls-dev to the latest version which contains the NLSBundlePlugin
  • Change the CopyWebpackPlugin usage to not use flatten any more. This was screwing up with the ignore pattern.
  • Fix extra files in shipped html-language-features extension. We have been shipping test fixtures from this extension, due to the issue related to flatten and ignore.
  • Add webpack to the python extension. It simply didn't have any.

Using diff, I verified that all nls metadata files are in and all the hashes match 🎆! The only other differences are:

$ diff -rq * | grep -v nls.metadata
Only in extensions-original/html-language-features/server/dist: 19813-4spaces.html
Only in extensions-original/html-language-features/server/dist: 19813.html
Only in extensions-original/html-language-features/server/dist: 19813-tab.html
Only in extensions-original/html-language-features/server/dist: 21634.html
Only in extensions-original/html-language-features/server/dist: about.css
Only in extensions-original/html-language-features/server/dist: about.html
Only in extensions-original/html-language-features/server/dist: icon.pic
Only in extensions-original/html-language-features/server/dist: index.html
Only in extensions/python: dist
Only in extensions-original/python: out
Files extensions/python/package.json and extensions-original/python/package.json differ

- update vscode-nls-dev
- fix CopyWebpackPlugin usage
- fix extra data in html extension
- add webpack to python
@joaomoreno João Moreno (joaomoreno) added vscode-build VS Code build process issues engineering VS Code - Build / issue tracking / etc. labels Jul 10, 2019
@joaomoreno João Moreno (joaomoreno) added this to the July 2019 milestone Jul 10, 2019

module.exports = function withDefaults(/**@type WebpackConfig*/extConfig) {
const folderName = path.relative(__dirname, extConfig.context).split(/[\\\/]/)[0];
const pkgPath = path.join(__dirname, folderName, 'package.json');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe simplify: extConfig.context is always the __dirname of the extension in question (not the dir of the shared config file) and I would have assumed that join(extConfig.context, 'package.json') does the job

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not in the cases that extension.webpack.config.js is deep in some server folder, unfortunately...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, true. You need the outer most package.json... Bummer. Might deserve a doc comment then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Damn I just committed that directly in GitHub using the suggested changes feature. I'm living in the year 3000.

@joaomoreno João Moreno (joaomoreno) mentioned this pull request Jul 10, 2019
25 tasks done
@joaomoreno

Copy link
Copy Markdown
Contributor Author

Build looks great. Merging this.

@joaomoreno
João Moreno (joaomoreno) merged commit dea3abb into master Jul 10, 2019
@joaomoreno
João Moreno (joaomoreno) deleted the joao/build-extensions branch July 10, 2019 09:19
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

engineering VS Code - Build / issue tracking / etc. vscode-build VS Code build process issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants