Skip to content

Freeze a2ui_core and a2ui_agent in this repo. - #1024

Merged
polina-c merged 5 commits into
flutter:mainfrom
polina-c:migrate
Aug 14, 2026
Merged

Freeze a2ui_core and a2ui_agent in this repo.#1024
polina-c merged 5 commits into
flutter:mainfrom
polina-c:migrate

Conversation

@polina-c

Copy link
Copy Markdown
Collaborator

Contributes to a2ui-project/a2ui#2234

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the a2ui_agent and a2ui_core packages from the workspace and replaces standard package imports with relative path imports across multiple tools, examples, and tests. The reviewer feedback correctly points out that using relative imports to reach into another package's lib/ directory, or importing a package's own library from its tests/examples via relative paths, violates Dart's avoid_relative_lib_imports linter rule. It is recommended to revert these relative imports and instead define proper path dependencies in the respective pubspec.yaml files to maintain standard package: imports.

I am having trouble creating individual review comments. Click here to see my feedback.

dev_tools/catalog_gallery/lib/sample_parser.dart (7)

medium

Using relative imports to reach into another package's lib/ directory is highly discouraged in Dart and violates the avoid_relative_lib_imports linter rule. It can lead to duplicate library instances at runtime and breaks package encapsulation.

Instead of using relative paths in Dart files, you should define a path dependency in dev_tools/catalog_gallery/pubspec.yaml:

dependencies:
  a2ui_core:
    path: ../../packages/archive/a2ui_core

This allows you to keep using the clean, standard package: import.

import 'package:a2ui_core/a2ui_core.dart' as core;

dev_tools/composer/lib/surface_editor.dart (8)

medium

Using relative imports to reach into another package's lib/ directory is highly discouraged in Dart and violates the avoid_relative_lib_imports linter rule.

Instead, define a path dependency in dev_tools/composer/pubspec.yaml:

dependencies:
  a2ui_core:
    path: ../../packages/archive/a2ui_core

This allows you to keep using the standard package: import.

import 'package:a2ui_core/a2ui_core.dart' as core;

examples/simple_chat/lib/a2ui_transport.dart (7)

medium

Using relative imports to reach into another package's lib/ directory is highly discouraged in Dart and violates the avoid_relative_lib_imports linter rule.

Instead, define a path dependency in examples/simple_chat/pubspec.yaml:

dependencies:
  a2ui_core:
    path: ../../packages/archive/a2ui_core

This allows you to keep using the standard package: import.

import 'package:a2ui_core/a2ui_core.dart' as core;

examples/verdure/client/lib/features/ai/ai_provider.dart (8-9)

medium

Using relative imports to reach into another package's lib/ directory is highly discouraged in Dart and violates the avoid_relative_lib_imports linter rule.

Instead, define a path dependency in examples/verdure/client/pubspec.yaml:

dependencies:
  a2ui_core:
    path: ../../../../../packages/archive/a2ui_core

This allows you to keep using the standard package: import.

import 'package:a2ui_core/a2ui_core.dart' as core;

packages/genui/test/error_reporting_test.dart (7)

medium

Using relative imports to reach into another package's lib/ directory is highly discouraged in Dart and violates the avoid_relative_lib_imports linter rule.

Instead, define a path dependency in packages/genui/pubspec.yaml:

dependencies:
  a2ui_core:
    path: ../archive/a2ui_core

This allows you to keep using the standard package: import.

import 'package:a2ui_core/a2ui_core.dart' as core;

packages/archive/a2ui_agent/example/a2ui_agent_example.dart (5)

medium

In Dart, examples and tests located outside the lib/ directory of a package should import the package using its package: URI rather than a relative path. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_agent/a2ui_agent.dart';

packages/archive/a2ui_agent/test/a2ui_agent_test.dart (5)

medium

In Dart, tests located outside the lib/ directory of a package should import the package using its package: URI rather than a relative path. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_agent/a2ui_agent.dart';

packages/archive/a2ui_core/test/binder_lifecycle_test.dart (5)

medium

In Dart, tests located outside the lib/ directory of a package should import the package using its package: URI rather than a relative path. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_core/a2ui_core.dart';

packages/archive/a2ui_core/test/binder_test.dart (5-9)

medium

In Dart, tests located outside the lib/ directory of a package should import the package's internal files using package:a2ui_core/... rather than relative paths. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_core/src/core/component_model.dart';
import 'package:a2ui_core/src/core/contexts.dart';
import 'package:a2ui_core/src/core/minimal_catalog.dart';
import 'package:a2ui_core/src/core/surface_model.dart';
import 'package:a2ui_core/src/rendering/binder.dart';

packages/archive/a2ui_core/test/data_model_test.dart (5-7)

medium

In Dart, tests located outside the lib/ directory of a package should import the package's internal files using package:a2ui_core/... rather than relative paths. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_core/src/core/data_model.dart';
import 'package:a2ui_core/src/primitives/errors.dart';
import 'package:a2ui_core/src/primitives/reactivity.dart';

packages/archive/a2ui_core/test/processor_test.dart (5-11)

medium

In Dart, tests located outside the lib/ directory of a package should import the package's internal files using package:a2ui_core/... rather than relative paths. This avoids violating the avoid_relative_lib_imports linter rule.

import 'package:a2ui_core/src/core/catalog.dart';
import 'package:a2ui_core/src/core/common_schemas.dart';
import 'package:a2ui_core/src/core/component_model.dart';
import 'package:a2ui_core/src/core/messages.dart';
import 'package:a2ui_core/src/core/minimal_catalog.dart';
import 'package:a2ui_core/src/core/surface_model.dart';
import 'package:a2ui_core/src/processing/processor.dart';

@polina-c
polina-c merged commit 96b024c into flutter:main Aug 14, 2026
43 checks passed
@polina-c
polina-c deleted the migrate branch August 14, 2026 01:41
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

Successfully merging this pull request may close these issues.

2 participants