Skip to content

Upgrade rosetta_generator to use recent build tools #72

@ndawod

Description

@ndawod

Because rosetta_generator hasn't been updated since May, it's enforcing us to use older versions of the build tools (build, analyzer, meta, etc.) Of course apps require many packages and when one is not updated for a while, it could lead to using old packages which is sadly what's happening in our case.

Trying to enforce dependencies is also unsuccessful because few calls in rosetta_generator are using methods that no longer exist in the build tools. As an example, when enforcing:

dependency_overrides:
  analyzer: "2.1.0"
  build: "2.1.0"
  code_builder: "4.1.0"
  dart_style: "2.0.3"
  glob: "2.0.1"
  meta: "1.7.0"
  recase: "4.0.0"
  source_gen: "1.1.0"

We get an error:

[INFO] Generating build script...
[INFO] Generating build script completed, took 582ms

[INFO] Precompiling build script......
[WARNING] ~/.pub-cache/hosted/pub.dartlang.org/rosetta_generator-0.2.2+1/lib/src/generator.dart:53:44: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
    final DartEmitter emitter = DartEmitter(Allocator());
                                           ^
~/.pub-cache/hosted/pub.dartlang.org/code_builder-4.1.0/lib/src/emitter.dart:74:3: Context: Found this candidate, but the arguments don't match.
  DartEmitter(
  ^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 11.3s

[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

Do you have an estimation when you'll bump up the build versions and release a new version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions