Skip to content

Fix run button disable. Switching to tutorial and back to samples (#1849) #2206

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

Merged
merged 7 commits into from
Apr 21, 2025

Conversation

thecoder93
Copy link
Contributor

@thecoder93 thecoder93 commented Mar 4, 2025

Hi, This should fix the problem #1849
I think that the first time the model is created and then the get is done. For samples kataSection is undefined and I don't know why the EntryPoint is missing. What do you think? Probably it's only a workaround.

@thecoder93 thecoder93 marked this pull request as draft March 5, 2025 13:24
@thecoder93
Copy link
Contributor Author

I saw that this workaround is not good, because there are same kata into different editor. I will work on it.

@thecoder93
Copy link
Contributor Author

I understood. From Monaco doc: Each model is identified by a URI. This is why it's not possible for two models to have the same URI.

Currently, we don't have the IDs for samples. Do you think to add it? I see also missing the structured type for Sample under npm/qsharp and the relative getAll such as Katas.
I think that with this we could have the independent ids for katas and Samples, thus when we do getModel from Monaco we get properly id.

@thecoder93 thecoder93 marked this pull request as ready for review March 7, 2025 16:59
@thecoder93
Copy link
Contributor Author

After several tests, I noticed a side effect when using updateDocument. Then the file is not closed with closeDocument. This should solve the problem. I think independent uri are therefore not necessary, or they would be an NTH.
What do you think?

@billti @minestarks

@minestarks
Copy link
Member

Sorry @thecoder93 , you caught us at a particularly busy time - just now getting to look at this fix. The code change looks reasonable but I don't immediately see the connection to #1849. Testing.

@thecoder93
Copy link
Contributor Author

No problem @minestarks
I think that if you follow steps described inside the issue, after this fix, you shouldn't have the problem.

@minestarks
Copy link
Member

Indeed I can repro the bug and this seems to fix it. Good catch @thecoder93 and thank you!

@minestarks minestarks enabled auto-merge April 21, 2025 17:11
@minestarks minestarks closed this Apr 21, 2025
auto-merge was automatically disabled April 21, 2025 17:12

Pull request was closed

@minestarks minestarks reopened this Apr 21, 2025
@minestarks minestarks enabled auto-merge April 21, 2025 17:12
@minestarks minestarks added this pull request to the merge queue Apr 21, 2025
@minestarks minestarks removed this pull request from the merge queue due to a manual request Apr 21, 2025
@minestarks minestarks added this pull request to the merge queue Apr 21, 2025
Merged via the queue into microsoft:main with commit 6568272 Apr 21, 2025
18 checks passed
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.

3 participants