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] Uncaught error thrown when debugging conduit.dart create list-templates #106

Open
MarkOSullivan94 opened this issue Aug 2, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@MarkOSullivan94
Copy link

MarkOSullivan94 commented Aug 2, 2022

Describe the bug

Whenever trying to debug conduit.dart (packages/conduit/bin/conduit.dart) using IntelliJ and run it with create list-templates arguments I get the following stacktrace.

-- Conduit CLI Version: 3.1.2
*** Uncaught error
    Bad state: No element
  **** Stacktrace
  * #0      ListMixin.firstWhere (dart:collection/list.dart:167:5)
  * #1      CLIConduitGlobal.conduitPackageRef (package:conduit/src/cli/commands/create.dart:388:10)
  * #2      CLIConduitGlobal.templateDirectory (package:conduit/src/cli/commands/create.dart:393:12)
  * #3      CLITemplateList.handle (package:conduit/src/cli/commands/create.dart:341:53)
  * #4      CLICommand.process (package:conduit/src/cli/command.dart:219:20)
  * <asynchronous suspension>
  * #5      main (file:///Users/mos/IdeaProjects/Work/conduit/packages/conduit/bin/conduit.dart:9:14)
  * <asynchronous suspension>
  ****

To Reproduce
Steps to reproduce the behavior:

  1. Clone master
  2. Open project on IntelliJ
  3. Setup run configuration to debug conduit.dart
  4. Click button to start debugging
  5. Uncaught error will be thrown

I have not globally activated conduit so the getter for conduitPackageRef returns null

Expected behavior

I should be able to debug conduit.dart without errors and should conduit not have been installed globally, then the templates would be found in the cloned conduit repo.

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS 12.2
@MarkOSullivan94 MarkOSullivan94 added the bug Something isn't working label Aug 2, 2022
@j4qfrost j4qfrost added enhancement New feature or request and removed bug Something isn't working labels Nov 23, 2022
@j4qfrost
Copy link

This is actually expected behavior. Currently conduit requires global activation to run. I'll work to make this not the case.

@j4qfrost j4qfrost reopened this Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants