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

Analysis in language repo fails #4066

Closed
eernstg opened this issue Aug 30, 2024 · 8 comments
Closed

Analysis in language repo fails #4066

eernstg opened this issue Aug 30, 2024 · 8 comments
Labels
static-metaprogramming Issues related to static metaprogramming

Comments

@eernstg
Copy link
Member

eernstg commented Aug 30, 2024

See this log.

Excerpt from log
Run dart analyze --fatal-infos .
Analyzing ....

  error - working/macros/dart_model/testing/benchmark/lib/json_macro/scratch.macro.dart:3:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part
  error - working/macros/example/bin/data_class_main.macro.dart:3:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part
  error - working/macros/example/bin/data_class_main.macro.dart:4:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part
  error - working/macros/example/bin/json_serializable_main.macro.dart:3:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part
  error - working/macros/example/bin/json_serializable_main.macro.dart:4:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part
  error - working/macros/example/bin/observable_main.macro.dart:3:1 - The part-of directive must be the only directive in a part. Try removing the other directives, or moving them to the library for which this is a part. - non_part_of_directive_in_part

6 issues found.
Error: Process completed with exit code 3.

An issue with working/macros/dart_model/testing/benchmark/lib/json_macro/scratch.macro.dart seems to cause language repo PRs to report "Some checks were not successful".

@jakemac53, does this look like an issue with json_macro, or would it be an analyzer issue?

@jakemac53
Copy link
Contributor

Cc @davidmorgan - also should we delete all the dart model stuff from here now?

@davidmorgan
Copy link
Contributor

Since dart-lang/sdk@2c77c67 it looks like macros need the "enhanced-parts" experiment to run in the analyzer, here is a PR adding it so the examples pass again: #4072

@davidmorgan
Copy link
Contributor

And indeed, delete dart_model from the language repo: #4073

@munificent
Copy link
Member

Looks like CI is still (or again) failing: https://github.com/dart-lang/language/actions/runs/11263974170/job/31323025779?pr=4126

@davidmorgan
Copy link
Contributor

That looks like an analyzer bug; enhanced parts are enabled so non_part_of_directive_in_part doesn't make sense.

Speaking of not making sense, I don't think it makes sense that we continue to maintain an e2e test for the analyzer here ;)

@jakemac53 we could move them to dart-lang/macros/v1_example, what do you think please? It actually does kinda make sense in that repo to check v1 functionality for the same SDK version we're testing with v2.

@jakemac53
Copy link
Contributor

The issue here is that enhanced parts wasn't given an experimental release version, so the new SDK requires a language version of 3.7.

However, I am working on a CL to give it an experimental release version of 3.6 which should resolve things.

@jakemac53
Copy link
Contributor

@jakemac53 we could move them to dart-lang/macros/v1_example, what do you think please? It actually does kinda make sense in that repo to check v1 functionality for the same SDK version we're testing with v2.

I don't have any strong opinions here really, once we have v2 actually working I would be very happy to just migrate everything to that.

@jakemac53
Copy link
Contributor

This looks to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static-metaprogramming Issues related to static metaprogramming
Projects
Development

No branches or pull requests

4 participants