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

[BUG] fvm install without argument should have a nicer error message #68

Closed
kuhnroyal opened this issue Jun 19, 2020 · 5 comments · Fixed by #69
Closed

[BUG] fvm install without argument should have a nicer error message #68

kuhnroyal opened this issue Jun 19, 2020 · 5 comments · Fixed by #69
Labels
bug Something isn't working

Comments

@kuhnroyal
Copy link
Contributor

fvm install without version argument throws an exception but should provide a nice error message instead.

Unhandled exception:
NoSuchMethodError: Class 'ExceptionMissingChannelVersion' has no instance getter 'message'.
Receiver: Instance of 'ExceptionMissingChannelVersion'
Tried calling: message
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      fvmRunner.<anonymous closure> (package:fvm/fvm.dart:30:45)
#2      _RootZone.runBinary (dart:async/zone.dart:1444:54)
#3      _FutureListener.handleError (dart:async/future_impl.dart:155:20)
#4      Future._propagateToListeners.handleError (dart:async/future_impl.dart:698:47)
#5      Future._propagateToListeners (dart:async/future_impl.dart:719:24)
#6      Future._completeError (dart:async/future_impl.dart:534:5)
#7      _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15)
#8      CommandRunner.runCommand (package:args/command_runner.dart)
<asynchronous suspension>
#9      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#10     new Future.sync (dart:async/future.dart:224:31)
#11     CommandRunner.run (package:args/command_runner.dart:112:14)
#12     fvmRunner (package:fvm/fvm.dart:26:23)
#13     main (file:///Users/p.leibiger/.pub-cache/hosted/pub.intern.sk/fvm-0.8.0/bin/main.dart:4:9)
#14     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

FVM Version: 0.8.0

With the new .fvm/fvm_config.json file the install command should look for this version and install and use this if available.

@kuhnroyal
Copy link
Contributor Author

Nice work. The same behavior should be applied to the use command and after that an init command can be added that combines both commands.

@leoafarias
Copy link
Owner

@kuhnroyal I have made a change on the use command. I am trying to make sure the install and use are distinctive commands. I have added a confirmation install on use.

Keep in mind that if the config exists it means the project is already using the version.

@kuhnroyal
Copy link
Contributor Author

@leoafarias There still seems to be a problem for me when checking out a configured project from VCS.
Running fvm install does not create the .fvm/flutter_sdk link and fvm use can not be run without a version. So there is something missing, either fvm use needs to be runnable without version (from config instead) or fvm install needs to create the link.
Alternatively there could be some new command for already configured projects.

@leoafarias
Copy link
Owner

@kuhnroyal Just deployed a new version that addresses this. Also I have set as version 1.0 as I think we are feature locked. Please let me know and open up any issues if you find anything

@kuhnroyal
Copy link
Contributor Author

kuhnroyal commented Jun 22, 2020

@leoafarias Thanks, I will test this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants