-
Notifications
You must be signed in to change notification settings - Fork 223
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
Error handling excludes from parent gitignore files prevents publishing #4300
Comments
I believe he warning is actually correct. The reason you see Even though it looks like the Directories are matched before their content recursively. And if a directory is ignored, its content is not examined at all. To truly except Try something like:
|
cc @elliette can you try those suggestions? |
Thank you! That almost worked! I added one more line to get it fully working:
I'm going to open up a CL with those changes. Closing this now. |
…ring publishing. Bug: dart-lang/pub#4300 Change-Id: I0679d5425b90d454e6f2bd7e0de9d0aac9e84581 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370700 Commit-Queue: Elliott Brooks <elliottbrooks@google.com> Reviewed-by: Devon Carew <devoncarew@google.com>
Problem
This came up when @elliette was trying to publish the
dap
package, which lives under https://github.com/dart-lang/sdk/tree/main/third_party/pkg/dap.There is a .gitignore file two directories above this, which ignores everything under third_party except some specifically listed directories, including this one (see here).
When trying to publish, pub gives an error that the files in the package are git ignored, and won't be published.
Error logs
Validating package... (1.5s)
Package validation found the following errors:
The pubspec is hidden, probably by .gitignore or pubignore.
You must have a LICENSE file in the root directory.
An open-source license helps ensure people can legally use your code.
Package validation found the following potential issues:
17 checked-in files are ignored by a
.gitignore
.Previous versions of Pub would include those in the published package.
Consider adjusting your
.gitignore
files to not ignore those files, and if you do not wish topublish these files use
.pubignore
. See also dart.dev/go/pubignoreFiles that are checked in while gitignored:
CHANGELOG.md
LICENSE
OWNERS
README.md
analysis_options.yaml
lib/dap.dart
lib/src/exceptions.dart
lib/src/protocol_common.dart
lib/src/protocol_generated.dart
lib/src/protocol_special.dart
Expected behavior
Should be able to publish, the directory is not actually ignored.
Actual behavior
Can't publish, and if we could it seems that several of the required files would not be published.
The text was updated successfully, but these errors were encountered: