-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Pnpm and other hard cache based managers cannot work with patch #492
Comments
Can you please move out or remote postinstall from |
@BusinessDuck a fix for detecting treemending was already applied is in the works (CodinGame/monaco-vscode-api#115), but we are discussing the best wayforward currently. Then calling it n times will no longer cause problems. |
I create my own patch by using |
Thanks for the hint. @CGNonofr what do you think about using https://www.npmjs.com/package/patch-package |
Example with pnpm (i guess contracts are same) Step 1: Create patch That will produce tmp folder to work with it for doing some modifications with package code. When you done with it go to step 2 Step 2: Commit patch That will produce new |
I've considered it but AFAIK, patch-package only allows to patch a package from the final project, generating a patch file in a specific folder. Please tell me how to use it in our use case. |
pnpm make changes inside of package.json, when i use in case with |
Ok so with pnpm I guess you can use it, referencing "patchedDependencies": {
"monaco-editor@0.37.1": "node_modules/vscode/monaco-editor-treemending.patch"
} ? |
I cant use patch linked to package, because patch cannot be found before |
So what are you suggesting here? |
Move patch to the client side or completely fork monaco-editor to monaco-editor-vscode (patched) package |
Patch is absolutely same with fork in current case, because patch contains a lot of changes... so much... :) And patch still not be able to apply any other monaco-editor version. That mean freeze (same with fork) monaco-editor package version. Also patch solution cannot be validated like forked typescript project. You can have bugs inside of patched code and you will not see this like in typescript |
What do you mean?
I've considered it, but it wouldn't allow to use other libraries using monaco-editor, like monaco-vim or monaco-emacs |
Use |
We had a fork of monaco-editor before, and we decided to give it up, it has some cons:
At the end, it's simpler for the final user to include the postinstall script than requiring them to use a fork of monaco |
Okay lets try do preinstall patch downloading from remote package. That may works fine with.
|
@BusinessDuck forking monaco-editor because we have a tool specific issue is not a good idea, IMO. In the end we create even more problems. If I recall correctly from what you wrote above |
Please no apologies, this is an open source project. If none of the options I suggested are suitable, I think that this is normal, because I am not familiar with many of the nuances in your project. Thanks, I'll be waiting for the merge. Perhaps I will contribute to this project later. |
Do you have chat with Microsoft guys? Can i join? |
There are no plans currently. |
Hi! As you may remember we had a discuss about pnpm and patching here.
I know the reason of this error:
Inside of pnpm we have hard package cache and
three-awesome
collecting all packages in to the one flat store without dependencies (symlinks used inside of internal packages deps folder) for example:monaco-language-client
depends frommonaco-editor
pnpm will extract this packages and create single for
monaco-language-client
and rootpackage.json
of main project. That mean ifmonaco-langauge-client
containspostinstall
script, the patch will be applied tosymlinked
package. Then second callpostinstall
in project root insidepackage.json
gonna be fall.Possible solutions:
Remove postinstall from
monaco-languageclient
and move out from package main packgage.json to examples or something other dirAlso we need to fix treemending script patch already installed detection and show the info, "Already patched", in case when patch really installed
Patch listing
UPD: Patch didnt works for me :C
The text was updated successfully, but these errors were encountered: