Skip to content

Conversation

@liamappelbe
Copy link
Contributor

@liamappelbe liamappelbe commented Dec 2, 2025

USRs are unique IDs for declarations that are generated by clang. But in a few places we have to append things to them, or construct synthetic USRs. This was being done in an ad-hoc way, so I'm making it safer:

  • Define a character that will never appear in real USRs from clang
  • Assert that every real USR doesn't contain this character
  • Switch each synthetic USR to include this character
    • ObjC blocks
    • Variadic function variants
    • Anonymous records

TODO: Fix CI

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

PR Health

License Headers ✔️
// Copyright (c) 2025, 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/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?

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

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

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

@coveralls
Copy link

coveralls commented Dec 2, 2025

Coverage Status

coverage: 82.325% (+0.3%) from 81.98%
when pulling bc7803e on ffigen_cleanup_3
into dac4797 on main.

@liamappelbe liamappelbe removed the request for review from HosseinYousefi December 2, 2025 04:19
@liamappelbe liamappelbe marked this pull request as draft December 2, 2025 04:19
@liamappelbe liamappelbe changed the title [ffigen] Tighten up synthetic USRs WIP: [ffigen] Tighten up synthetic USRs Dec 2, 2025
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.

2 participants