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

[collection] Ignore directory starting with _ as version from git source #1657

Conversation

pocke
Copy link
Member

@pocke pocke commented Nov 30, 2023

The git source should allow for putting a directory starting with _ in a gem directory.

Background

I'm planning to introduce a new reviewing system to https://github.com/ruby/gem_rbs_collection.
In the new system, I'll add a new file to describe who is responsible for the gem. For example: (The file name is tentative)

.
└── gems
    └── rails
        ├── 7.0
        └── _reviewers.yaml

But rbs collection interprets _reviewers.yaml as a version. It is unexpected behavior.

Solution

Ignore files/directories starting with _ as a version.

Ignoring files starting with _ is an existing convention in RBS. So I think this behavior is natural for the users.

This solution has another advantage. We can use a directory starting with _ for another purpose. For example, we can put an RBS generator for the gem in the directory.

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

👍

@soutaro soutaro added this pull request to the merge queue Nov 30, 2023
@soutaro soutaro added this to the RBS 3.4 milestone Nov 30, 2023
Merged via the queue into ruby:master with commit 39e6a83 Nov 30, 2023
24 checks passed
@pocke pocke deleted the _collection__Ignore_directory_starting_with_____as_version_from_git_source branch November 30, 2023 14:42
soutaro added a commit that referenced this pull request Dec 20, 2023
…tory_starting_with_____as_version_from_git_source"

This reverts commit 39e6a83, reversing
changes made to c1f4c8f.
@soutaro soutaro added the Released PRs already included in the released version label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

2 participants