Skip to content

Offer a proper flutter packages publish command for publishing a Flutter package #10403

Closed

Description

@mit-mit

Currently to publish a Flutter package, you need to run flutter pub pub publish. We really should have something more straightforward like flutter packages publish.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    p: toolingAffects the flutter_plugin_tools package
    on May 31, 2017
  2. mit-mit commented on May 31, 2017

    @mit-mit
    MemberAuthor

    We could also just do my original proposal: #9799

  3. mit-mit commented on May 31, 2017

    @mit-mit
    MemberAuthor

    @Hixie didn't you add pub pub recently? Can you elaborate on why we went that route?

  4. Hixie commented on May 31, 2017

    @Hixie
    Contributor

    Forwarding individual commands requires keeping the flutter tool in sync with the pub tool as to its precise commands (including "secret" commands, any esoteric behaviour when parsing arguments, etc), so that you can do anything the pub tool can do. Simply having a passthrough as a "last ditch" solution allowed me to use all the pub commands without any such concern and no ongoing maintenance.

    I'm fine with also having flutter commands that happen to pass through, like flutter packages get, flutter packages upgrade, and flutter packages test. These aren't intended to offer all the features of the underlying tool, just Flutter's opinion of those features.

  5. mit-mit commented on Jun 1, 2017

    @mit-mit
    MemberAuthor

    OK. This is a concrete request for flutter publish then.

  6. sethladd commented on Jun 1, 2017

    @sethladd
    Contributor

    You want flutter publish or flutter packages publish ?

    flutter publish might be useful for publishing an app. I think qualifying publish for now is safer.

  7. mit-mit commented on Jun 2, 2017

    @mit-mit
    MemberAuthor

    Not a bad point; flutter packages publish works.

  8. changed the title [-]Offer a proper command for publishing a Flutter package[/-] [+]Offer a proper `flutter packages publish` command for publishing a Flutter package[/+] on Jun 2, 2017
  9. mzimmerm commented on Nov 28, 2017

    @mzimmerm

    @sethladd : I have to admit I am completely (maybe beyond repair) confused by the relationship of the pub commands and their flutter equivalents (and surprised others may not be, judging by the lack of ability to find answers on stack overflow).

    Is there a summary table somewhere that relates those commands (as in, flutter pub command on the left, dart pub command on the right)? - such as in #9799 (which is not implemented if I understand correctly)

    But for now, what is the correct command actually publish a flutter package on pub? (I think I published my flutter package incorrectly as a dart package, not sure about the consequences).

    Thanks

  10. Hixie commented on Nov 28, 2017

    @Hixie
    Contributor

    @mzimmerm flutter packages pub ... is equivalent to pub .... (See flutter packages --help.)

  11. mit-mit commented on Nov 28, 2017

    @mit-mit
    MemberAuthor

    Currently the equivalents are:

    Nice short command available

    1. flutter packages get -> pub get
    2. flutter packages upgrade -> pub upgrade

    No short command available; long command needed:

    1. flutter packages pub publish -> pub publish to support publishing a plugin
    2. flutter packages pub version -> pub version to see the pub version
      etc.
  12. mzimmerm commented on Nov 29, 2017

    @mzimmerm

    @Hixie @mit-mit : Thanks both, I realize this was not the place to ask, but this item and #9799 was the most often linked from searches. This sounds like one can always use flutter packages pub <pub-command> (maybe there should be a questionmark here) and obtain the desired pub results, which is what I was confused about. (I am not sure why one cannot then just use the pub command portion, but will assume the flutter packages does some processing specific for flutter). Thanks

  13. Hixie commented on Nov 30, 2017

    @Hixie
    Contributor

    Yeah you have to use flutter packages pub ... instead of pub ... because the flutter tool configures pub to understand that there's a Flutter SDK installed, so that pubspec.yaml files can say sdk: flutter and have it work correctly.

  14. mzimmerm commented on Nov 30, 2017

    @mzimmerm

    That makes sense, thanks. I wonder if it may be a good thing to highlight this somewhere explicitly - the following site, for example, https://flutter.io/developing-packages/, writes about flutter packages pub publish, but does not provide a motivation (of the difference from pub publish). It does not help that in Idea, the clickable text is Packages get (not flutter packages get or pub get). I was confused by this for quite a while, but maybe it was just me. Thanks for the explanation.

  15. added this to the milestone on Jan 15, 2019
  16. modified the milestones: , on Dec 21, 2019
  17. modified the milestones: , on Jan 7, 2020
  18. jmagman commented on Jan 18, 2020

    @jmagman
    Member

    Documentation instructions are:

    flutter pub publish

    @mit-mit Was this fixed with #38490 / #33302 ?

  19. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 18, 2020
  20. mit-mit commented on Jan 20, 2020

    @mit-mit
    MemberAuthor

    Yes, this was indeed fixed and is in the latest stable build

  21. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jan 20, 2020
  22. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  23. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityp: toolingAffects the flutter_plugin_tools packagetoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions