Skip to content
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

[native_assets_cli] Add paths to syntax views #2107

Merged
merged 1 commit into from
Mar 19, 2025
Merged

Conversation

dcharkes
Copy link
Collaborator

@dcharkes dcharkes commented Mar 19, 2025

Bug: #1826

This PR adds the path that was navigated through the JSON to the syntax classes. This makes syntax errors more descriptive: Unexpected value '123' for 'target_os'. Expected a String. -> Unexpected value '123' (int) for 'config.code.target_os'. Expected a String..

Because the data asset and code asset extensions don't know the internals of the base protocol extension, the extension points now expose both a json and a jsonPath. That path is then used to instantiate the syntax view of the extension, so it can give more precise error messages.

(The next PR will add a full syntax validation pass, at which point we should be able to address #2039.)

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 marked this pull request as ready for review March 19, 2025 09:21
Base automatically changed from refactor-generator-3 to main March 19, 2025 14:07
@auto-submit auto-submit bot merged commit 543902c into main Mar 19, 2025
40 checks passed
@auto-submit auto-submit bot deleted the json-view-paths branch March 19, 2025 14:18
@coveralls
Copy link

Coverage Status

coverage: 86.693% (+0.05%) from 86.642%
when pulling b115edf on json-view-paths
into 10a25e3 on main.

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.

3 participants