-
Notifications
You must be signed in to change notification settings - Fork 680
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
Improve VS Code Extension Contributing Guidelines #53
Comments
@jsjoeio thanks! I'll get to updating the contribution guidelines, but for the time being:
Contributions welcome! |
(Migrated issue from foam-vscode to foam monorepo) |
It seems like now that the project is using a monorepo format, it's a bit less straightforward to get the extension up and running locally. Any chance you can provide some guidance on how to do that? (note: new to Yarn workspaces) Here are some issues I've run into so far: TypeScript compile errorsCompiling the Running the extensionBefore, I could hit F5 to run the new extension host instance of VS Code. Now, it doesn't seem to know that it's a VS Code extension, unless I hit F5 with the Testing the extension in developmentThis ones may sound silly, but bare with me...but when I'm testing the extension locally in the new extension host instance of VS Code and I'm using a Foam workspace (i.e. my personal one) and I want to run a command:
Does that make sense? P.S. - if I get some help, I promise to help contribute back by turning this information into some docs! 😄 |
@jsjoeio these are very good points you raise! I was a bit hasty with the monorepo move. Trying to move a bit too fast with the few free hours I have. Running the extensionAfter migration I did not test running the foam-vscode project from the monorepo -- I opened a new VS Code instance from the Those tasks are defined in the tasks.json and launch.json config files in foam-vscode/.vscode.
I did not get the TypeScript compile errorsI discovered the same issue, where the TS compiler was not happy with conflicting global types for assertion methods exported by mocha and jest. I don't think --skipLibCheck is the way to go here, instead we should harmonize our types. Since we actually have real tests written in Jest in foam-workspace-manager but no real tests written for the vscode extension or cli with Mocha, I opted to remove the Mocha dependencies for now with the goal of replacing them with Jest. More info in the commit message in 24d81a9 The project builds cleanly for me now. I'm not a TypeScript expert (team Flow 😢), so if anyone has ideas on best practices for setting up TypeScript monorepos, I'd be all ears. Testing the extension in developmentWhen you start the extension development host, the local version of the extension "shadows" or overrides any installed versions of the package with the same ID. So when you F5/start the extension host, you should always be running the local version, plus any other extensions your workspace/vscode is configured to run. AFAIK you can't run the "shadowed" base install while running the local extension Further monorepo workThere's a still a bit of work to do to make the monorepo setup smooth. Tracking it in #57 Documentation
Yes please 🙏🙏🙏🙏🙏 |
@jevakallio thanks for the detailed explanations and feedback! Seems to be working a lot smoother now! 😃
I am no longer seeing this.
😍 So glad to hear this! The last extension I worked on, we did the same It made things a lot easier. Sweet! Well I was able to get things running and submitted a PR to improve the docs. With that, others should be able to get up and running quickly. |
I wanted to give a stab at contributing but I got stuck getting this extension to work locally. I tried adding a new hello world command to get things started, but I'm struggling to get that working.
It would be awesome for us to add some docs for getting this working locally! A few thoughts:
The text was updated successfully, but these errors were encountered: