fix: rebuild @devfile/api dependency to fix che-in-che development#472
Closed
vitaliy-guliy wants to merge 5 commits intomainfrom
Closed
fix: rebuild @devfile/api dependency to fix che-in-che development#472vitaliy-guliy wants to merge 5 commits intomainfrom
vitaliy-guliy wants to merge 5 commits intomainfrom
Conversation
Signed-off-by: vitaliy-guliy <vgulyy@redhat.com>
|
Pull Request images published ✨ Editor: quay.io/che-incubator-pull-requests/che-code:pr-472-amd64 |
Contributor
Author
|
I think it is better to port changes directly to It is possible manually download the script to the project and launch it after installing node dependencies |
Contributor
Author
|
Superseded by #506 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Re-compiles
@devfile/apinode package on its place insidenode_modules/@devfile/apidirectory to have a library with typecommonjsinstead ofmodule.Since the type of
@devfile/apinode package has been changed fromcommonjstomodule, it become not possible anymore to useimportfrom VS Code when we compile it inside the workspace and then launch a secondary editor instance.The
@devfile/apiversion we are currently using can be found here https://www.npmjs.com/package/@devfile/api/v/2.3.0-1723034342?activeTab=codeIt it possible to open
packge.jsonand check fortypeproperty.The version we used before is https://www.npmjs.com/package/@devfile/api/v/2.2.1-alpha-1667236163?activeTab=code
There is no
typeproperty in thepackage.jsonfile, so defaultcommonjsvalue is used.Why do we have the issue when compile and run the editor in the development mode only?
Normally, the
webpackis used to create the editor bundle, and instead of having a dozen of separate javascript file, we have only one weight, obfuscated javascript file which speeds up the process of downloading the script in the browser.When we compile che-code in the development mode, the compiler creates thousands of seprarate javascript files and then when we run the backend with node, we face the restriction with the incompatibility of types (vscode is compiled as commonjs).
The changes provided by this pull request will be used only when che-code dogfooding.
What issues does this PR fix?
eclipse-che/che#23163
How to test this PR?
create a workspace from this the branch https://github.com/che-incubator/che-code/tree/recompile-devfile-api
run
devfile: Run VS Code server on port 8000command. When the command is being executed, it is possible to check the output and see which@devfile/apipackages have been recompiled.run
devfile: Compile with npmcommandrun
devfile: Run VS Code server on port 8000command and open the secondary editor in a separate windowonce the editor is opened, ensure there are no error notifications appeared
Does this PR contain changes that override default upstream Code-OSS behavior?
git rebasewere added to the .rebase folder