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

fvm wrapper fails to install dependencies #129

Open
toonvanstrijp opened this issue Jan 31, 2024 · 0 comments
Open

fvm wrapper fails to install dependencies #129

toonvanstrijp opened this issue Jan 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@toonvanstrijp
Copy link

Description of the bug

When using the fvm wrapper it fails to install the dependencies. This is caused because it's executing the wrong command. This is seen below in the logs:

[INFO] openapi_generator on lib/api.config.dart:Installing dependencies with generated source. fvm pub get

[SEVERE] openapi_generator on lib/api.config.dart:
Failed to generate content.

Install within generated sources failed.  #0      OpenapiGenerator.fetchDependencies (package:openapi_generator/src/openapi_generator_runner.dart:406:36)
<asynchronous suspension>
#1      OpenapiGenerator.generatorV2 (package:openapi_generator/src/openapi_generator_runner.dart:171:9)
<asynchronous suspension>
#2      normalizeGeneratorOutput (package:source_gen/src/output_helpers.dart:10:1)
<asynchronous suspension>
#3      StreamCompleter.se

Steps to reproduce

To reproduce this issue you can use the following config:

@Openapi(
  additionalProperties: AdditionalProperties(
    pubName: 'hycare_api',
    enumUnknownDefaultCase: true,
    wrapper: Wrapper.fvm,
  ),
  inputSpec: RemoteSpec(
    path: "http://localhost:3000/docs-json",
  ),
  cachePath: ".dart_tool/build/openapi_cache.json",
  generatorName: Generator.dio,
  runSourceGenOnOutput: true,
  outputDirectory: 'api',
)

Now simply run the fvm flutter pub run build_runner build --delete-conflicting-outputs and you can see it fails to install.

Expected behavior

I would expect that when the fvm wrapper is used the install command looks like fvm flutter pub get.

Logs

No response

Screenshots

No response

Platform

macOS

Library version

5.0.2

Flutter version

3.16.4

Flutter channel

stable

Additional context

No response

@toonvanstrijp toonvanstrijp added the bug Something isn't working label Jan 31, 2024
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

No branches or pull requests

1 participant