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

ensure exclude: path filtering works in multi-option contexts #54858

Closed
Tracked by #53876
pq opened this issue Feb 8, 2024 · 5 comments
Closed
Tracked by #53876

ensure exclude: path filtering works in multi-option contexts #54858

pq opened this issue Feb 8, 2024 · 5 comments
Assignees
Labels
analyzer-analysis-options area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Feb 8, 2024

Looking at failures in https://dart-review.googlesource.com/c/sdk/+/350342, it appears that excludes aren't working properly.

For example:

error - _fe_analyzer_shared/test/constants/data/errors.dart:9:75 - Methods can't be invoked in constant expressions. - const_eval_method_invocation

in https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8756645794309906337/+/u/analyze_pkg_/stdout

Despite the presence of:

  exclude:
    - test/constants/data/**
@pq pq added P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-analysis-options labels Feb 8, 2024
@pq pq self-assigned this Feb 8, 2024
@srawlins
Copy link
Member

@pq Is there progress on this?

@pq
Copy link
Member Author

pq commented Feb 27, 2024

Still simmering... It's a little tricky and needs design work.

@pq
Copy link
Member Author

pq commented Mar 7, 2024

Hopefully this will be fixed w/ https://dart-review.googlesource.com/c/sdk/+/351521.

copybara-service bot pushed a commit that referenced this issue Mar 7, 2024
See: #54858

Should address failures seen in https://dart-review.googlesource.com/c/sdk/+/350342



Change-Id: Iedff9a0a4d44f96424a173f6a6bc655900ec8446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351521
Commit-Queue: Phil Quitslund <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
@pq
Copy link
Member Author

pq commented Mar 7, 2024

06eea7c improves matters but we're still not there.

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8754154758524980737/+/u/analyze_pkg_/stdout

At least 2 issues remain:

  1. There are a host of newly reported diagnostics. For example:

info - vm/testcases/transformations/ffi/finalizable_late_2.dart:19:31 - Statements in a for should be enclosed in a block. Try wrapping the statement in a block. - curly_braces_in_flow_control_structures

curly_braces_in_flow_control_structures should not be enabled here. It's a lint enabled by the core set which is included in an options file in the parent directory but without an include here should not be inherited (unless we want to change current semantics).

Here's the relevant options file:

analyzer:
  errors:
    sdk_version_since: ignore
  exclude:
    - deferred_loading/**
    - to_string_transformer/**
    - type_flow/**
    - unreachable_code_elimination/**

Note no include:.

  1. Error severity configurations are not working right.

Looking above, you'd expect sdk_version_since to be filtered, but it's not:

warning - vm/testcases/transformations/ffi/ffinative.dart:72:10 - This API is available since SDK 3.3.0, but constraints '>=3.0.0 <4.0.0' don't guarantee it. Try updating the SDK constraints. - sdk_version_since

@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 15, 2024
copybara-service bot pushed a commit that referenced this issue Mar 19, 2024
See: #54858

Change-Id: Ied3f8eb61c2a846dee3108d61690c4308b02a96f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356380
Commit-Queue: Phil Quitslund <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
@pq
Copy link
Member Author

pq commented Mar 20, 2024

The initial reported issue is fixed; remaining issues tracked in #55252

@pq pq closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-analysis-options area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants