Skip to content

Conversation

@dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Jan 20, 2026

A test case to use for

The test case checks:

  • the library uri for a definition inside lib/ (should be package uri)
  • the library uri for a definition inside another packages' lib/ (should be package uri)
  • the library uri for a definition outside lib/ (what should the canonical uri be of this? I left an open TODO.)
  • the library uri for a use inside lib/ (should be package uri)
  • the library uri for a use inside another packages' lib/ (should be package uri)
  • the library uri for a use outside lib/ (what should the canonical uri be of this? I left an open TODO.)

See the linked issue for the current state of the VM and dart2js implementation.

@github-actions
Copy link

github-actions bot commented Jan 20, 2026

PR Health

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/hooks_runner/test_data/download_assets/hook/build.dart
pkgs/jni/test/debug_release_test.dart
pkgs/objective_c/example/command_line/lib/main.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

This check can be disabled by tagging the PR with skip-license-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
hooks_runner None 1.0.1 1.0.2-wip 1.0.1 ✔️
record_use Breaking 0.4.2 0.5.0-wip 0.5.0 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

@github-actions
Copy link

PR Health

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/hooks_runner/test_data/download_assets/hook/build.dart
pkgs/jni/test/debug_release_test.dart
pkgs/objective_c/example/command_line/lib/main.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

This check can be disabled by tagging the PR with skip-license-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
record_use Breaking 0.4.2 0.5.0-wip 0.5.0 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

@coveralls
Copy link

coveralls commented Jan 20, 2026

Coverage Status

coverage: 81.798% (-0.008%) from 81.806%
when pulling 9f69269 on record-use-library-uris
into 6127a50 on main.

@dcharkes dcharkes requested review from goderbauer and mosuem January 20, 2026 16:15
Copy link
Contributor

Choose a reason for hiding this comment

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

This hook seems to really be a test. Does it run on CI? It wasn't immediately clear to my what triggered it there...

Copy link
Contributor

Choose a reason for hiding this comment

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

Might also be worthwhile to document on top of this file that really, it's the test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will trigger it on the Dart CI. This is a test data project. I'm working on
the Dart SDK CL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's document for future readers here (and maybe on the pubspec) that that's how it is run on CI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All test_data/ projects in pkgs/hooks_runner/ follow the same project btw.

For dart2js, `dart compile js --write-resources` and inspect the contents of
the file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Soo... is just just a manual test? Can we automate it (i.e. the inspecting of the content of the file) and run it on CI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will automate it inside the Dart SDK, not on dart-lang/native. (Running it
here would be bad, we would see fixes and breakages only on dev and stable
releases.)

@mosuem
Copy link
Member

mosuem commented Jan 21, 2026

General thought: toString is not great if meant for more than just debugging strings - it's hard to find usages etc. I would prefer a custom method for that.

Comment on lines 31 to 32
positionalArguments: [null],
namedArguments: {'bar': null},
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's include an additional test with multiple arguments for both? (The current one wouldn't have caught the , typo)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's document for future readers here (and maybe on the pubspec) that that's how it is run on CI.

@dcharkes
Copy link
Collaborator Author

General thought: toString is not great if meant for more than just debugging strings - it's hard to find usages etc. I would prefer a custom method for that.

It's for debugging, that is what I was doing. I don't want to add something for users, but we can't not do it if we want debugging info ourselves.

@dcharkes
Copy link
Collaborator Author

I can also remove all the toString stuff and let Gemini generate it again the next time I need it 😆 It's not the point of this PR.

@dcharkes dcharkes requested a review from goderbauer January 21, 2026 11:15
Copy link
Contributor

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@dcharkes dcharkes merged commit bf77b81 into main Jan 21, 2026
29 checks passed
@dcharkes dcharkes deleted the record-use-library-uris branch January 21, 2026 11:27
marinkobabic pushed a commit to marinkobabic/native that referenced this pull request Jan 21, 2026
marinkobabic pushed a commit to marinkobabic/native that referenced this pull request Jan 21, 2026
Hassnaa9 pushed a commit to Hassnaa9/native that referenced this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants