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

Move CI command checks into testsuite #2609

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

Earlopain
Copy link
Contributor

Motivation

Closes #2604
Alternative to #2605

Implementation

Just move all the rubocop-specific requires into their own file and gate it once there.

Automated Tests

This moves the two CI checks into the test suite. They would have caught this error, expect rubocop is available to these. So, create a seperate Gemfile that contains only the gem itself. I still have them only run in CI now, they take a bit of time (though not that much overall)

Manual Tests

I tested that ruby-lsp works with and without rubocop in a users gemfile. Offenses show up as expected.

@Earlopain Earlopain requested a review from a team as a code owner September 24, 2024 11:39
@andyw8 andyw8 added bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels Sep 24, 2024
@vinistock
Copy link
Member

vinistock commented Sep 24, 2024

Thank you for the PR! I put #2610 up to address the issue quickly.

However, as pointed out in #2610 (comment), we should have an integration test to ensure this doesn't happen again.

@vinistock
Copy link
Member

Okay, the fix itself is merged. We'd love to have that integration test shipped.

The CI commands use the Gemfile of the repo, which contains
additional gems like `rubocop` and `syntax_tree`.

This hides issues like Shopify#2604. So, create a separate Gemfile
containing only ruby-lsp and use that instead
@Earlopain Earlopain changed the title Fix error when rubocop is not available in a users Gemfile Move CI command checks into testsuite Sep 24, 2024
@Earlopain
Copy link
Contributor Author

Alright, rebased and left only the tests in.

Copy link
Contributor

@andyw8 andyw8 left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@vinistock vinistock added chore Chore task and removed bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels Sep 30, 2024
@vinistock vinistock merged commit bfc941b into Shopify:main Sep 30, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hidden dependency on rubocop in ruby-lsp 0.18.2
3 participants