Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: _Statement.toDartDocString generates different strings on Windows and Ubuntu. #156

Merged
merged 5 commits into from
Nov 4, 2021

Conversation

drstranges
Copy link
Contributor

@drstranges drstranges commented Nov 3, 2021

What's wrong:
_Statement.toDartDocString generates different strings on Windows and Ubuntu.
It causes changes in git if file was initially generated on Ubuntu, then checked out on Windows.

Ubuntu: /// File path: assets/images/state/empty_state_new_space_black.svg
Windows: /// File path: assets\images\state\empty_state_new_space_black.svg

Fix: Write Linux-style path on Windows too.

Fixed _Statement.toDartDocString, that was generated different strings on Windows and Ubuntu.
Windows:  /// File path: assets/images/state/empty_state_new_space_black.svg
Ubuntu:    /// File path: assets\images\state\empty_state_new_space_black.svg
@lcdsmao lcdsmao requested a review from wasabeef November 4, 2021 00:42
@wasabeef
Copy link
Member

wasabeef commented Nov 4, 2021

@drstranges
Thank you for finding it.

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #156 (c0a3a74) into main (ac8ae40) will not change coverage.
The diff coverage is 100.00%.

❗ Current head c0a3a74 differs from pull request most recent head 489f73b. Consider uploading reports for the commit 489f73b to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #156   +/-   ##
=======================================
  Coverage   98.93%   98.93%           
=======================================
  Files          19       19           
  Lines         565      565           
=======================================
  Hits          559      559           
  Misses          6        6           
Impacted Files Coverage Δ
packages/core/lib/generators/assets_generator.dart 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac8ae40...489f73b. Read the comment docs.

@wasabeef wasabeef added this to the 4.1.1 milestone Nov 4, 2021
Apply @wasabeef's suggestion: used posixStyle for file path.

Co-authored-by: Daichi Furiya <dadadada.chop@gmail.com>
@wasabeef wasabeef merged commit c52e451 into FlutterGen:main Nov 4, 2021
@wasabeef wasabeef modified the milestones: 4.1.1, 4.1.2 Nov 5, 2021
@wasabeef
Copy link
Member

wasabeef commented Nov 5, 2021

@drstranges
Just released v4.1.2 of that fixed version.
I appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants