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

Add multi-root workspace configuration file #2505

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Dec 31, 2024

Currently, to make LSP servers like Ruby LSP properly work for gem, like sentry-ruby, we need to open /sentry-ruby separately. When working on tasks across multiple gems, like sentry-ruby and sentry-rails, it requires 2 separate VS Code windows while each can not interact with each other.

For example, when using Debug code lens provided by Ruby LSP in sentry-rails's tests, we can put breakpoints inside sentry-rails's codebase, but not in sentry-ruby.

But if we open the project through this new workspace configuration file, the multi-root workspace feature in VS Code will allow us to

  • Access code across multiple gems
  • Debug code with VS Code across multiple gems
  • Run language servers independently for each gem

Limitations

Potential Improvements

  • We can add workspace-level copilot prompt to make Copilot smarter about the SDK (example)
  • We can add some launch configurations to make debugging with our example apps easier
  • If you are used to VS Code tasks, we can add some project-wide tasks (linting, testing...etc.) that may be handy

#skip-changelog

Currently, to make LSP servers like Ruby LSP properly work for gem, like
`sentry-ruby`, we need to open `/sentry-ruby` separately. When working on
tasks across multiple gems, like `sentry-ruby` and `sentry-rails`, it requires
2 separate VS Code windows while each can not interact with each other.

For example, when using `Debug` code lens provided by Ruby LSP in `sentry-rails`'s
tests, we can put breakpoints inside `sentry-rails`'s codebase, but not in `sentry-ruby`.

But if we open the project through this new workspace configuration file,
the multi-root workspace feature in VS Code will allow us to

- Access code across multiple gems
- Debug code with VS Code across multiple gems
- Run language servers independently for each gem
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.20%. Comparing base (ad535cc) to head (26e7857).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2505   +/-   ##
=======================================
  Coverage   98.20%   98.20%           
=======================================
  Files         128      128           
  Lines        4837     4837           
=======================================
  Hits         4750     4750           
  Misses         87       87           
Components Coverage Δ
sentry-ruby 98.57% <ø> (ø)
sentry-rails 97.07% <ø> (ø)
sentry-sidekiq 97.42% <ø> (ø)
sentry-resque 92.85% <ø> (ø)
sentry-delayed_job 95.65% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (ø)

Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

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

I already have a setup like that, so I'm happy to see this being added to the repo where we can manage it together :)

@st0012 st0012 merged commit bf8d8c5 into master Jan 2, 2025
141 of 144 checks passed
@st0012 st0012 deleted the add-workspace-configratuion-file branch January 2, 2025 00:29
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