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

"Duplicate function implementation" eror when loading two models with same function name #1883

Closed
shreedhart opened this issue Mar 24, 2020 · 1 comment

Comments

@shreedhart
Copy link

monaco-editor version: 0.20.0
Browser: Chrome
OS: Windows 10
Playground code that reproduces the issue:

var editor = monaco.editor.create(document.getElementById("container"), {
	value: "",
	language: "typescript"
});

var model1 = monaco.editor.createModel("function hello() {}", "typescript", monaco.Uri.file("foo"));
editor.setModel(model1);

var model2 = monaco.editor.createModel("function hello() {}", "typescript", monaco.Uri.file("bar"));
editor.setModel(model2);

When two models have same function implementation and connected to same editor, there is an "Duplication function implementation" error.

image

Looks like all models connected to an editor are treated as if they are part of the same project. Is there a way to treat each model as a separate project?

@alexdima
Copy link
Member

alexdima commented Apr 2, 2020

Duplicate of #1105

@alexdima alexdima marked this as a duplicate of #1105 Apr 2, 2020
@alexdima alexdima closed this as completed Apr 2, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators May 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants