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

git dependencies on windows causes error with missing name comment #1756

Closed
ride4sun opened this issue Dec 6, 2017 · 9 comments
Closed

git dependencies on windows causes error with missing name comment #1756

ride4sun opened this issue Dec 6, 2017 · 9 comments

Comments

@ride4sun
Copy link

ride4sun commented Dec 6, 2017

I run flutter packages upgrade on windows with this pubspec.yaml file.
This works well on Mac OSX and Travis.
Attached log output on the end.

name: lookatmybaby_flutter
description: Look at my baby Flutter client app.
version: 0.1.0

publish_to: none # prevent accidental publishing

dev_dependencies:
  bwu_grinder_tasks: ^0.1.1-dev
  grinder: ^0.8.0
  http: ^0.11.3
  stack_trace: '>= 1.8.2 < 1.10.0'
  uuid: ^0.5.3

  flutter_test:
    sdk: flutter

  flutter_driver:
    sdk: flutter

dependencies:
#  Pluto:
#    git: git://github.com/FaisalAbid/pluto
  flutter:
    sdk: flutter
#  lookatmybaby_shared:
#    path: '../lookatmybaby_shared'
  built_collection: ^2.1.0
  built_redux: ^7.0.0
#  built_redux_thunk: ^0.4.0
  built_value: ^4.0.0
  collection: ^1.14.0
#  contact_picker: ^0.0.1+2
  device_info: ^0.0.4
  google_sign_in: #^1.0.1
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/google_sign_in'
  googleapis: ^0.47.0
  googleapis_auth: ^0.2.3+6
  firebase_analytics: #^0.0.4
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/firebase_analytics'
  firebase_auth: #^0.1.1
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/firebase_auth'

  firebase_database: #^0.0.12
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/firebase_database'

  firebase_storage: #0.0.6
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/firebase_storage'

#  firebase_storage:
#    git:
#      url: git://github.com/franzsilva/plugins.git
#      path: packages/firebase_storage
  flutter_image: ^0.0.2
  image_picker: #^0.1.1
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/image_picker'

  intl: ^0.15.0
  logging: ^0.11.3
  observable: ^0.20.4+1
  path_provider: ^0.2.1+1
  shared_preferences: #^0.2.5
    git:
      url: git://github.com/flutter/plugins.git
      path: 'packages/shared_preferences'

  rxdart: ^0.15.0
  sentry: ^0.0.6 # TODO(zoechi) until git://github.com/flutter/flutter/issues/9592 is fixed



  #Widgets
#  flutter_search_bar: "^1.0.4"


dependency_overrides:
  quiver: ^0.26.2
  #  url_launcher: '^0.4.0'
  #  intl_translation: '>=0.14.0 <0.15.0'
  #  html_unescape: '^0.1.5'


# For information on the generic Dart part of this file, see the
# following page: git://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.


  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the Icons class.
#dev_dependencies:
 #  flutter_test:
  #   sdk: flutter

flutter:
  uses-material-design: true
  assets:
    - assets/look1119x236-32.png
    - assets/toolbar_baby.png
    - assets/toolbar_family.png
    - assets/toolbar_resources.png
    - assets/menu_switch_family.png
    - assets/menu_invite_people.png
    - assets/menu_join_request.png
    - assets/menu_join_another_family.png
    - assets/menu_user_rights.png
    - assets/menu_more_settings.png
    - assets/menu_more_settings.png

  # To add assets to your application, add an assets section here, in
  # this "flutter" section, as in:
  # assets:
  #  - images/a_dot_burr.jpeg
  #  - images/a_dot_ham.jpeg

  # To add assets from package dependencies, first ensure the asset
  # is in the lib/ directory of the dependency. Then,
  # refer to the asset with a path prefixed with
  # `packages/PACKAGE_NAME/`. Note: the `lib/` is implied, do not
  # include `lib/` in the asset path.
  #
  # Here is an example:
  #
  # assets:
  #  - packages/PACKAGE_NAME/path/to/asset

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700

flutter doctor

C:\Projects\lambDev\lookatmybaby_flutter>flutter doctor
[√] Flutter (on Microsoft Windows [Version 10.0.16299.98], locale en-US, channel alpha)
    • Flutter at c:\sdks\flutter
    • Framework revision fd7853faad (7 hours ago), 2017-12-05 16:12:55 -0800
    • Engine revision b57fca02b5
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d4cfecb1065d322d3670df7e9ec9a0cc2d4b90f0

[√] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    • Android SDK at C:\Users\ride4\AppData\Local\Android\sdk
    • Android NDK location not configured (this optional configuration is useful for native profiling support)
    • Platform android-27, build-tools 27.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Community Edition (version 2017.2)
    • Flutter plugin version 19.1
    • Dart plugin version 172.4343.25

[√] Connected devices
    • None

Here is the flutter packages upgrade output:
log.txt

@zoechi
Copy link

zoechi commented Dec 6, 2017

It's the same with https:// and git://

@nex3
Copy link
Member

nex3 commented Dec 6, 2017

It looks like we're running git show rev:path\with\backslashes. I'm guessing Git doesn't like backslash-separated paths on Windows, but I want to verify that before I work on a fix. Can someone with a Windows machine test manually and let me know the result?

@ride4sun
Copy link
Author

ride4sun commented Dec 7, 2017

@nex3
On Windows 10

git show rev:https//github.com/dart-lang/pub.git
fatal: Invalid object name 'rev'.

git show rev:https\github.com\dart-lang\pub.git
nothing coming back...

@nex3
Copy link
Member

nex3 commented Dec 7, 2017

Try git show HEAD:lib\library.dart, but replace library.dart with a file that actually exists.

@colski
Copy link

colski commented Apr 13, 2018

I am seeing the same problem.
image
image

@denniskaselow
Copy link

denniskaselow commented Apr 13, 2018

Same here. Windows user, dependency:

dev_dependencies:
  build_test:
    git:
      url: https://github.com/dart-lang/build.git
      path: build_test

Running pub get:

IO  : Spawning "cmd /c git show ee4a9bf33c91d29ac73ab60eab4e2e1366d713d0:build_test\pubspec.yaml" in C:\Users\dennis\AppData\Roaming\Pub\Cache\git\cache\build-e8a1ba051f64dd25a93aebf7636b277a599f3c2f
IO  : Finished git. Exit code 0.
    | Nothing output on stdout.
    | Nothing output on stderr.
...
ERR : Error on line 1, column 1: Missing the required "name" field.

Running git show ee4a9bf33c91d29ac73ab60eab4e2e1366d713d0:build_test\pubspec.yaml (via Git Bash)

fatal: Path 'build_testpubspec.yaml' does not exist in 'ee4a9bf33c91d29ac73ab60eab4e2e1366d713d0'

Running via cmd there is no output.

Running git show ee4a9bf33c91d29ac73ab60eab4e2e1366d713d0:build_test/pubspec.yaml (with / instead of \ works in Git Bash and in cmd.

@nex3
Copy link
Member

nex3 commented Apr 24, 2018

Can someone who's running into this issue try #1877 and see if it fixes it for them?

@denniskaselow
Copy link

denniskaselow commented Apr 24, 2018

Works for me. At least the package resolution.

But then it hangs when it tries to Precompiling executables... (no errors, no exception, just nothing more happening). If I switch to verbose mode, I see that the problem is a backslash that's encoded as %5C (/bin%5Ctest.dart instead of /bin/test.dart). But that also happens if I use the master branch - so it isn't a problem with the fix. If I use the pub that's installed (2.0.0-dev.49.0, same version as the master branch), it's correct and uses a slash instead of an encoded backslash. Seems like a problem of running via dart bin/pub.dart.

IO  : Spawning "cmd /c dart --packages=.packages --snapshot=.\.dart_tool/pub\bin\test\bin\test.dart.snapshot file:///C:/Users/dennis/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.34/bin%5Ctest.dart" in F:\Programming\workspaces\dart\dartemis_builder\.

@denniskaselow
Copy link

I dove in a bit deeper, and the problem for the %5C problem is 5ca86eb. It changes what precompiling executables does.
If I go back to 711f515 dart bin/pub.dart runs just fine.

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

No branches or pull requests

5 participants