Code Monkey home page Code Monkey logo

Comments (7)

dnfield avatar dnfield commented on May 18, 2024 9

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.

davidmorgan avatar davidmorgan commented on May 18, 2024 2

This is a bug in flutter_test; it should not pin to exactly 1.8.0. I'll file an issue.

from pedantic.

davidmorgan avatar davidmorgan commented on May 18, 2024 1

@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.

dnfield avatar dnfield commented on May 18, 2024

(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.

fstof avatar fstof commented on May 18, 2024

This also applies to flutter_driver where it pins the pedantic version.

Should probably fix both of these at one time

from pedantic.

dnfield avatar dnfield commented on May 18, 2024

@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.

fstof avatar fstof commented on May 18, 2024

Thanks @dnfield.
No problem. Will do the override.

from pedantic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.