Comments (7)
Note that, however we slice this, you will not be able to easily use the non-pinned pedantic with Flutter stable. However, you could work around it with a dependency_override:
name: flutter_project
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
pedantic: 1.8.0+1
dependency_overrides:
pedantic: 1.9.0
from pedantic.
This is a bug in flutter_test
; it should not pin to exactly 1.8.0. I'll file an issue.
from pedantic.
@dnfield Yeah, I'll close this.
IMHO, it is a mistake for any package to ever have a direct non-dev depdnency on pedantic. The package offers only one function that is exactly this:
Please don't suggest that people copy and paste as an alternative to adding a dependency. There's nothing wrong with small packages. Flutter not complying with semver is a bug, copying and pasting is a workaround, not a good practice.
from pedantic.
(this should generally be safe because all of the dart code in pedantic is a one line function that doesn't really change from version to version)
from pedantic.
This also applies to flutter_driver
where it pins the pedantic version.
Should probably fix both of these at one time
from pedantic.
@fstof flutter_driver does not depend on or pin pedantic.
I think this issue should probably be closed. Flutter very intentionally pins its dependencies, including transitive dependencies. We do this because failure to do so opens us up to strange and difficult to debug breakages when some transitive dependency makes a breaking change but doesn't properly update the semver - which happpens more often than one might expect. Flutter aims to depend on as few libraries as possible, and to pin the libraries it does depend on so that it can reliably and predictably run tests.
We do try to frequently update package dependencies - there is an open issue to automate this process at flutter/flutter#37985
IMHO, it is a mistake for any package to ever have a direct non-dev depdnency on pedantic. The package offers only one function that is exactly this:
void unawaited(Future<void> future) {}
which is super trivial to just implement yourself and never get into conflicts between which version of pedantic two packages want to use or pin to.
And worst case scenario, you can just use a dependency override as suggested in #46 (comment) - which should pretty much always work because pedantic only has that one function in it code wise.
from pedantic.
Thanks @dnfield.
No problem. Will do the override.
from pedantic.
Related Issues (20)
- Rephrase README - the lints reach outside the scope of effective Dart HOT 1
- Tag the v1.9.0 release HOT 2
- Ignore rules in yaml config HOT 4
- Omit type annotations for local variables make code harder to understand. HOT 49
- prefer_single_quotes needs an automatic fix HOT 5
- Getting dart analyses warning for auto generated file HOT 3
- Omit type annotation for local variable lint warning is only shown in certain situation. HOT 20
- Don't allow `as` to be used in casting, it does more harm than good. HOT 2
- 'flutter pub get' fails for pedantic 1.9.1 HOT 4
- Re-add back the definition of `unawaited` to this package
- Invalid include_file_not_found when pedantic added to dev_dependencies HOT 5
- What does "does not reflect common usage" mean? HOT 4
- Exclude option doesn't work HOT 1
- Feature request: find hardcoded strings HOT 1
- Allow future.unawaited aside unawaited(future) HOT 12
- Remove unsafe_html HOT 2
- Show lint warning when a late marked field is final and initialized when declaring. HOT 3
- sort_constructors_first gives false positives for factories HOT 2
- Provide an options file which includes `package:lints/recommended.yaml` HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pedantic.