Skip to content

[native_assets_cli] Nest config extensions #2133

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

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Mar 25, 2025

Closes: #2091

Nests the extension configurations under an extension key in config:

{
  "config": {
    "code": { // old location
      "android": {
        "target_ndk_api": 21
      },
      "link_mode_preference": "dynamic"
    },
    "extensions": {
      "code_assets": { // new location, scoped by package name
        "android": {
          "target_ndk_api": 21
        },
        "link_mode_preference": "dynamic"
      }
    }
  },
}

PR changes

  • pkgs/hook and pkgs/code_assets

    • Introduces new schemas in the non-generated .schema.json files.
    • Adds deprecation and version skew notice in schemas. (And update the generated schema to pick these comments up.)
    • Adds test data for the new location.
    • Added JSON schema tests for the new location
  • package:native_assets_cli

    • Generated the syntax classes.
    • Deal with version skew in the mapping between syntax classes and semantic API.
    • Fix tests that deal with syntax errors.

Version skew between hooks and SDKs

  • Backwards compatibility older hooks: Still emit config.code.
  • Backwards compatibility older SDKs: Also read config.extensions.code_config.

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

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

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 symbols
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/jni/lib/src/third_party/generated_bindings.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@dcharkes dcharkes force-pushed the nest-config-extensions branch from 52645d6 to 9cd337d Compare March 25, 2025 14:42
@dcharkes dcharkes force-pushed the nest-config-extensions branch from 9cd337d to 6c10593 Compare March 26, 2025 07:26
Base automatically changed from equals-override to main March 26, 2025 07:36
@dcharkes dcharkes force-pushed the nest-config-extensions branch from 6c10593 to 2c05819 Compare March 26, 2025 07:53
@coveralls
Copy link

Coverage Status

coverage: 85.954% (-0.07%) from 86.021%
when pulling 2c05819 on nest-config-extensions
into e2bd08e on main.

@dcharkes
Copy link
Collaborator Author

Friendly ping @mosuem @HosseinYousefi. This one in the big stack was left unreviewed.

@auto-submit auto-submit bot merged commit 1563f3f into main Mar 26, 2025
46 checks passed
@auto-submit auto-submit bot deleted the nest-config-extensions branch March 26, 2025 13:58
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.

[native_assets_cli] JSON nest config extensions
3 participants