Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

nit: Add a short comment explain path dependencies - #2511

Closed
jonasfj wants to merge 329 commits into
flutter-team-archive:masterfrom
jonasfj:add-path-import-comment
Closed

nit: Add a short comment explain path dependencies#2511
jonasfj wants to merge 329 commits into
flutter-team-archive:masterfrom
jonasfj:add-path-import-comment

Conversation

@jonasfj

@jonasfj jonasfj commented Feb 10, 2020

Copy link
Copy Markdown
Contributor

Adds a comment # ^x.y.z in your application where examples have path dependencies.

This was motivated by dart-lang/pub#1850 (comment) where a user is running into problems by copying the dependency from an example/pubspec.yaml.

Maybe we shouldn't make it all one-line... and maybe we could phrase the comment better.
Or maybe we shouldn't even do this -- feel free to close this if you think this is too obvious :)

@jonasfj
jonasfj requested a review from amirh February 10, 2020 12:43

@amirh amirh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sdk: flutter
android_alarm_manager:
path: ../
android_alarm_manager: {path: ../} # ^x.y.z in your application

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't care if this is one line or 2 lines, though I don't want these to go back-and-forth between the 2 styles.
This is the kind of things we should write in a style guide, the closest thing to a style guide I found are the examples here: https://dart.dev/tools/pub/dependencies (which are using 2 lines). If we believe this style is preferred we should probably update that page as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only used the one-liner style because it put the comment on the same line.

sdk: flutter
android_alarm_manager:
path: ../
android_alarm_manager: {path: ../} # ^x.y.z in your application

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd make the comment more verbose so it's easier to understand why it's a path dependency here, maybe something like:

The example app is bundled with the plugin so we use a path dependency on the parent directory to use the current plugin's version. When depending on this package from a real application you should use : plugin_name: ^x.y.z
See https://dart.dev/tools/pub/dependencies#version-constraints for more information.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, that's better than using one-line :)

@amirh amirh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Version checker is complaining as we did not bump package versions, I'm ok with landing this without publishing assuming people mostly check the examples in GitHub and not from the pub tarball, though it's an interesting thought to run by @jonasfj 😄

@jonasfj
jonasfj requested a review from amirh February 18, 2020 18:05
@jonasfj

jonasfj commented Feb 18, 2020

Copy link
Copy Markdown
Contributor Author

@amirh, I just updated the PR to include publish_to: 'none' for all example plugins.

They aren't meant to be published I assume, and the template already has these:
https://github.com/flutter/flutter/blob/5f4658973be1ad10a59a0a278b6cdf41b10fe7f6/packages/flutter_tools/templates/app/pubspec.yaml.tmpl#L4

@jonasfj
jonasfj force-pushed the add-path-import-comment branch 2 times, most recently from cfd78db to be20c9f Compare March 17, 2020 09:16
@jonasfj

jonasfj commented Mar 17, 2020

Copy link
Copy Markdown
Contributor Author

@amirh, I've updated this and flutter/flutter#50978, if you're still happy with this let's ship it :)

@jonasfj

jonasfj commented Mar 17, 2020

Copy link
Copy Markdown
Contributor Author

Please merge if you're happy with this.

@ened

ened commented Apr 17, 2020

Copy link
Copy Markdown
Contributor

hi @jonasfj could you please rebase & take a look at the CI errors?

@jonasfj
jonasfj force-pushed the add-path-import-comment branch from be20c9f to 21c6066 Compare April 17, 2020 10:16
@jonasfj

jonasfj commented Apr 17, 2020

Copy link
Copy Markdown
Contributor Author

Not sure why CI would fail.

ditman and others added 15 commits September 30, 2020 13:37
…ve#3093)

* Convert initial Polyline/Polygon points correctly.
* Convert Flutter Color to CSS correctly.

Fixes flutter/flutter#65152
Fixes flutter/flutter#67032
@jonasfj

jonasfj commented Feb 12, 2021

Copy link
Copy Markdown
Contributor Author

Okay, I'm going to close this... Not sure what mess I just made of the history 🙈

@jonasfj jonasfj closed this Feb 12, 2021
@jonasfj
jonasfj deleted the add-path-import-comment branch February 12, 2021 14:58
@google-cla

google-cla Bot commented Feb 12, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla Bot added cla: no and removed cla: yes labels Feb 12, 2021
@stuartmorgan-g

Copy link
Copy Markdown
Contributor

@jonasfj If you want to do a clean version I can review it ASAP so it doesn't bitrot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.