Skip to content

Conversation

@aznhassan
Copy link
Contributor

Problem

Sharing a project with testFiles in its pxt.json in the extension will result in a shared project that does not load. This happens because the test files are excluded from the text sent to the backend but still left in the pxt.json. When the project is loaded in a browser, the typescript compiler will fail since the missing test file will be null.

Solution

Use MKC

One possible solution is to just use the makecode package directly. However, the makecode package does some extra work around downloading and caching the target editor before sharing the project. This is probably the reason we chose to just match the rest of the sharing logic instead of using it directly.

Even if we wanted to just use the makecode extension, the exposed shareCommand that we would use returns void and merely logs the link to the console. So, we'd have to update MKC instead of just using it as a drop-in replacement of the already existing shareLink.ts

Match MKC and include test files

The makecode package will include the test files in the shared project if they are present. We can just match that behavior to fix the issue.

Validation

I created a local vsix and installed it. I cloned https://github.com/Kikketer/arcade-testshare locally and opened the folder in new VS Code Window. Using the extension, I was able to share the project. It now loads as expected. https://arcade.makecode.com/85698-69144-34682-34885

fixes #7278

@aznhassan aznhassan requested review from jwunderl and riknoll January 9, 2026 00:05
@aznhassan aznhassan self-assigned this Jan 9, 2026
Copy link
Member

@jwunderl jwunderl left a comment

Choose a reason for hiding this comment

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

LGTM (did you figure out what the problems were with vsix / run in web scenarios?)

@aznhassan
Copy link
Contributor Author

LGTM (did you figure out what the problems were with vsix / run in web scenarios?)

Yup! Richard helped me out; turns out it was a WSL issue. What exactly? I'm not sure, but it worked as expected once I installed the VSIX from Windows.

@aznhassan aznhassan merged commit 4e53298 into main Jan 9, 2026
4 of 5 checks passed
@aznhassan aznhassan deleted the aznhassan/sharing branch January 9, 2026 01:10
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.

VSCode Share Link is Invalid

3 participants