-
Notifications
You must be signed in to change notification settings - Fork 21
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
Spoom bump not ignoring files as expected #379
Labels
bug
Something isn't working
Comments
👋 Hey @plvaldes, Do you mind posting your Sorbet config here please? That would help me fix the issue 🙏 |
Hey @Morriar ! 👋🏼 This is the file:
It's in the melody repo |
Just saying we're hitting this as well. I'd love for |
Morriar
added a commit
that referenced
this issue
Jun 6, 2023
We ignore files matching the paths ignored in the `sorbet/config` and try to reproduce Sorbet behvior. From Sorbet docs on `--ignore`: > Ignores input files that contain the given string in their paths (relative to the input path passed to > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`. To produce the same behavior, we match files using `File.fnmatch?` and we were prefixing and suffixing the paths with `**`. When the Sorbet config contains ignored files with extensions like this: ``` --ignore=foo.rb ``` This doesn't work as we are trying to match `foo.rb` with `**/foo.rb/**`. To fix this problem, we only append `**` to the ignored path IF it does contain a file extension. Fixes #379. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Morriar
added a commit
that referenced
this issue
Jun 6, 2023
We ignore files matching the paths ignored in the `sorbet/config` and try to reproduce Sorbet behvior. From Sorbet docs on `--ignore`: > Ignores input files that contain the given string in their paths (relative to the input path passed to > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`. To produce the same behavior, we match files using `File.fnmatch?` and we were prefixing and suffixing the paths with `**`. When the Sorbet config contains ignored files with extensions like this: ``` --ignore=foo.rb ``` This doesn't work as we are trying to match `foo.rb` with `**/foo.rb/**`. To fix this problem, we only append `**` to the ignored path IF it does contain a file extension. Fixes #379. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Morriar
added a commit
that referenced
this issue
Jun 6, 2023
We ignore files matching the paths ignored in the `sorbet/config` and try to reproduce Sorbet behvior. From Sorbet docs on `--ignore`: > Ignores input files that contain the given string in their paths (relative to the input path passed to > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`. To produce the same behavior, we match files using `File.fnmatch?` and we were prefixing and suffixing the paths with `**`. When the Sorbet config contains ignored files with extensions like this: ``` --ignore=foo.rb ``` This doesn't work as we are trying to match `foo.rb` with `**/foo.rb/**`. To fix this problem, we only append `**` to the ignored path IF it does contain a file extension. Fixes #379. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Morriar
added a commit
that referenced
this issue
Jun 6, 2023
We ignore files matching the paths ignored in the `sorbet/config` and try to reproduce Sorbet behvior. From Sorbet docs on `--ignore`: > Ignores input files that contain the given string in their paths (relative to the input path passed to > Sorbet). Strings beginning with / match against the prefix of these relative paths; others are substring > matchs. Matches must be against whole folder and file names, so `foo` matches `/foo/bar.rb` and > `/bar/foo/baz.rb` but not `/foo.rb` or `/foo2/bar.rb`. To produce the same behavior, we match files using `File.fnmatch?` and we were prefixing and suffixing the paths with `**`. When the Sorbet config contains ignored files with extensions like this: ``` --ignore=foo.rb ``` This doesn't work as we are trying to match `foo.rb` with `**/foo.rb/**`. To fix this problem, we only append `**` to the ignored path IF it does contain a file extension. Fixes #379. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The command
spoom bump --from false --to true --dry
is trying to bump files that I have in my ignore list insorbet/config
.I am assuming that spoom config is picked from
sorbet/config
as I read in the docs. Actually, runningbin/spoom config
in my project lists all the ignore paths in that file (see link in steps to reproduce)To Reproduce
Spoom version: '1.2.1'
Steps to reproduce the behavior:
There are more details about the context and what I did in this discourse thread, but the TL;DR should be:
# typed: true
, change itfalse
sorbet/config
as--ignore=the_file.rb
spoom bump --from false --to true --dry
Expected behavior
The file should be ignored and no errors should be displayed
The text was updated successfully, but these errors were encountered: