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

Check already patched before checking version #208

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

CGNonofr
Copy link
Contributor

No description provided.

Copy link
Collaborator

@kaisalmen kaisalmen left a comment

Choose a reason for hiding this comment

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

LGTM

@CGNonofr
Copy link
Contributor Author

@kaisalmen By doing so, updating monaco-vscode-api without updading monaco-editor will no longer throw an error, isn't that an issue?

@kaisalmen
Copy link
Collaborator

kaisalmen commented Oct 12, 2023

The peerDependency must be specific. E.g. next version (1.83.0 must have "monaco-editor": "~0.44.0" as peerDependency than every dependent package should get a warning, right?

@CGNonofr
Copy link
Contributor Author

The peerDependency must be specific. E.g. next version (1.83.0 must have "monaco-editor": "~0.44.0" as peerDependency than every dependent package should get a warning, right?

We don't use peerDependencies anymore but I got your point!

Most users ignore those errors though and we introduced the version check to prevent this

@kaisalmen
Copy link
Collaborator

Most users ignore those errors though and we introduced the version check to prevent this

Bold idea: monaco-vscode-api only relies on @codingame/monaco-editor-treemended and people should use it directly. Bundlers should use WA like this one we suggested for monaco-editor-core in the past.

Maybe, this clearer. There is no ideal solution, but it would move the problem to become just a configuration issue

@CGNonofr
Copy link
Contributor Author

I really don't know what's best... depending on @codingame/monaco-editor-treemended will probably duplicate monaco-editor if the user uses another library which has monaco-editor as dependency and produce weird behaviors

@CGNonofr CGNonofr merged commit 0b5262a into main Oct 12, 2023
1 check passed
@CGNonofr CGNonofr deleted the make-treemending-work-on-treemended-version branch October 12, 2023 15:09
@kaisalmen
Copy link
Collaborator

@CGNonofr what about a check a runtime that directly logs at a very early point an info or an error if a tree-mended monaco-editor or not is used. This should be fairly easy to add, right?

@CGNonofr
Copy link
Contributor Author

@CGNonofr what about a check a runtime that directly logs at a very early point an info or an error if a tree-mended monaco-editor or not is used. This should be fairly easy to add, right?

I'm not sure, how would you implement it?

@kaisalmen
Copy link
Collaborator

I'm not sure, how would you implement it?

Augment MonacoEnvironment in the treemended package and check it at initialize?

@CGNonofr
Copy link
Contributor Author

Why not, it may help! feel free to implement it 👍

@kaisalmen
Copy link
Collaborator

Why not, it may help! feel free to implement it 👍

Ok, but it won't happen today

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.

2 participants