" melos publish --no-dry-run --yes" complains about pubspec_overrides even if usePubspecOverrides: false
iapicca opened this issue · 6 comments
Is there an existing issue for this?
- I have searched the existing issues.
Version
3.1.1
Description
running melos publish --no-dry-run --yes
in github actions yields
Package validation found the following hint:
* Non-dev dependencies are overridden in pubspec_overrides.yaml.
command:
bootstrap:
# It seems so that running "pub get" in parallel has some issues (like
# https://github.com/dart-lang/pub/issues/3404). Disabling this feature
# makes the CI much more stable.
runPubGetInParallel: false
# TODO: https://github.com/iapicca/yak_packages/issues/225
usePubspecOverrides: false
Steps to reproduce
- set
usePubspecOverrides: false
- run
melos publish --no-dry-run --yes
in a project containing a flutter package
Expected behavior
should not hint about dependencies_override
Actual behavior
Package validation found the following hint:
* Non-dev dependencies are overridden in pubspec_overrides.yaml.
This indicates you are not testing your package against the same versions of its
dependencies that users will have when they use it.
This might be necessary for packages with cyclic dependencies.
Please be extra careful when publishing.```
### Additional context and comments
```yaml
Resolving dependencies...
collection 1.17.1 (1.17.2 available)
matcher 0.12.15 (0.12.16 available)
material_color_utilities 0.2.0 (0.8.0 available)
source_span 1.9.1 (1.10.0 available)
stack_trace 1.11.0 (1.11.1 available)
stream_channel 2.1.1 (2.1.2 available)
! stub 2.0.0 from path ../stub (overridden in ./pubspec_overrides.yaml)
test_api 0.5.1 (0.6.1 available)
! yak_result 2.0.0 from path ../yak_result (overridden in ./pubspec_overrides.yaml)
! yak_runner 2.0.0 from path ../yak_runner (overridden in ./pubspec_overrides.yaml)
! yak_tween 2.0.0 from path ../yak_tween (overridden in ./pubspec_overrides.yaml)
! yak_utils 2.0.0 from path ../yak_utils (overridden in ./pubspec_overrides.yaml)
Got dependencies!
Publishing yak_flutter 2.0.1 to [https://pub.dev:](https://pub.dev/)
├── CHANGELOG.md (<1 KB)
├── LICENSE (1 KB)
├── README.md (<1 KB)
├── analysis_options.yaml (<1 KB)
├── example
│ └── README.md (<1 KB)
├── lib
│ ├── src
│ │ ├── all.dart (<1 KB)
│ │ ├── delegates
│ │ │ ├── all.dart (<1 KB)
│ │ │ └── theme
│ │ │ ├── all.dart (<1 KB)
│ │ │ ├── monochrome.dart (3 KB)
│ │ │ └── theme_data_delegate.dart (<1 KB)
│ │ ├── extensions
│ │ │ ├── all.dart (<1 KB)
│ │ │ ├── buildcontext.dart (<1 KB)
│ │ │ ├── color.dart (1 KB)
│ │ │ └── widgets.dart (<1 KB)
│ │ ├── typedef
│ │ │ ├── all.dart (<1 KB)
│ │ │ └── swatch.dart (<1 KB)
│ │ └── widgets
│ │ ├── all.dart (<1 KB)
│ │ └── preferred_size_themed.dart (<1 KB)
│ └── yak_flutter.dart (<1 KB)
├── pubspec.yaml (<1 KB)
└── test
├── delegates
│ └── theme
│ ├── monochrome_test.dart (6 KB)
│ └── theme_data_delegate_test.dart (<1 KB)
├── extensions
│ ├── buildcontext_test.dart (1 KB)
│ ├── color_test.dart (2 KB)
│ └── widgets_test.dart (<1 KB)
├── tools
│ └── mock_context.dart (<1 KB)
├── typedef
│ └── swatch_test.dart (<1 KB)
└── widgets
└── preferred_size_themed_test.dart (4 KB)
Validating package...
Package validation found the following hint:
* Non-dev dependencies are overridden in pubspec_overrides.yaml.
This indicates you are not testing your package against the same versions of its
dependencies that users will have when they use it.
This might be necessary for packages with cyclic dependencies.
Please be extra careful when publishing.
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=8[183](https://github.com/iapicca/yak_packages/actions/runs/...
Then click "Allow access".
Waiting for your authorization...
Error: The operation was canceled.```
It looks like that option has been removed completely:
https://github.com/invertase/melos/blob/b049ed897402921a5b0f3b818e49b47e3b3bf4cf/docs/guides/migrations.mdx#L55C17-L55C17
I was also wondering why it doesn't work, but the option is also missing from the documentation. The only mentions I can find of it are in GitHub issues, but nowhere in the documentation.
I was hoping to disable the use of pubspec_overrides.yaml
completely, because we want to start using Melos just for the parallel execution. Maybe later, we would use it for the dependency handling as well (since that's apparently the main feature), but right now, we're only interested in parallel execution.
I have removed usePubspecOverrides: false
but the issue persists
I'm starting to suspect the issue is unrelated to pubspec_overrides
it may be that just ignores the token provided and triggers the login via browser
logs
yak_result:
Resolving dependencies...
! stub 2.0.1 from path ../stub (overridden in ./pubspec_overrides.yaml)
! yak_utils 2.0.1 from path ../yak_utils (overridden in ./pubspec_overrides.yaml)
Got dependencies!
Publishing yak_result 2.0.1 to [https://pub.dev:](https://pub.dev/)
├── CHANGELOG.md (<1 KB)
├── LICENSE (1 KB)
├── README.md (<1 KB)
├── analysis_options.yaml (<1 KB)
├── example
│ └── README.md (<1 KB)
├── lib
│ ├── src
│ │ ├── all.dart (<1 KB)
│ │ ├── classes
│ │ │ ├── all.dart (<1 KB)
│ │ │ ├── failure.dart (<1 KB)
│ │ │ ├── result.dart (<1 KB)
│ │ │ └── success.dart (1 KB)
│ │ ├── extensions
│ │ │ ├── all.dart (<1 KB)
│ │ │ ├── as_failure.dart (<1 KB)
│ │ │ ├── as_success.dart (<1 KB)
│ │ │ ├── as_void.dart (<1 KB)
│ │ │ ├── failure_recast.dart (<1 KB)
│ │ │ ├── is_x.dart (<1 KB)
│ │ │ ├── iterable_combine.dart (1 KB)
│ │ │ └── iterable_combine_unary.dart (1 KB)
│ │ └── typedef
│ │ ├── all.dart (<1 KB)
│ │ ├── delegates.dart (1 KB)
│ │ ├── future_result.dart (<1 KB)
│ │ ├── nullary_function.dart (<1 KB)
│ │ └── unary_function.dart (<1 KB)
│ └── yak_result.dart (<1 KB)
├── pubspec.yaml (<1 KB)
└── test
├── classes
│ ├── failure_test.dart (2 KB)
│ ├── result_test.dart (5 KB)
│ └── success_test.dart (6 KB)
└── extensions
├── as_failure_test.dart (2 KB)
├── as_success_test.dart (2 KB)
├── as_void_test.dart (<1 KB)
├── failure_recast_test.dart (1 KB)
├── is_x_test.dart (3 KB)
├── iterable_combine_test.dart (6 KB)
└── iterable_combine_unary_test.dart (6 KB)
Total compressed archive size: 6 KB.
Validating package...
Package validation found the following hint:
* Non-dev dependencies are overridden in pubspec_overrides.yaml.
This indicates you are not testing your package against the same versions of its
dependencies that users will have when they use it.
This might be necessary for packages with cyclic dependencies.
Please be extra careful when publishing.
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A45859&code_challenge=bvibsI1E8LPFgSld1V90tCuqG8tUDyg3wlnEXThZsWM&code_challenge_method=S256&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
Then click "Allow access".
Waiting for your authorization...
@spydon could you take a look?
@iapicca the warning about:
This indicates you are not testing your package against the same versions of its
dependencies that users will have when they use it.
can be disregarded, since it is exactly what melos does (but pub can't see that), makes sure that you test it to the same version as will be available to the users after you have published.
The authorization problem that you are having is most likely unrelated to Melos.
How are you passing the token?
This indicates you are not testing your package against the same versions of its dependencies that users will have when they use it.
can be disregarded,
I suspected so
The authorization problem that you are having is most likely unrelated to Melos. How are you passing the token?
yes (code) it worked in the the past
This is getting a bit off-topic, but are you certain that your secrets are set correctly?
yeah, I have the feeling that isn't melos fault... sorry about that