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

[ffigen] Bumped dart_style to 3.0 #1940

Merged
merged 2 commits into from
Jan 24, 2025
Merged

Conversation

Levi-Lesches
Copy link
Contributor

@Levi-Lesches Levi-Lesches commented Jan 24, 2025

Was hitting an issue in some of my projects that ffigen: ^16.0.0 depends on dart_style: <3.0.0 which depends on analyzer: <7.0.0, but analyzer 7.0.0 is being used by some other packages, which makes ffigen the bottleneck. This PR fixes that by simply bumping dart_style from ^2.3.7 to ^3.0.0.

The biggest change from dart_style (see the changelog) is the mandatory inclusion of the language version, in order to facilitate the new 3.7 formatter. Luckily, ffigen already passed this parameter voluntarily, so no code change was necessary.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@Levi-Lesches Levi-Lesches changed the title Bumped dart_style to 3.0 [ffigen]Bumped dart_style to 3.0 Jan 24, 2025
@Levi-Lesches Levi-Lesches changed the title [ffigen]Bumped dart_style to 3.0 [ffigen] Bumped dart_style to 3.0 Jan 24, 2025
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

@coveralls
Copy link

coveralls commented Jan 24, 2025

Coverage Status

coverage: 87.681% (+6.2%) from 81.471%
when pulling 74b3845 on Levi-Lesches:dart-style-3
into 60890ee on dart-lang:main.

@Levi-Lesches
Copy link
Contributor Author

I set the formatter that runs on the generated code to stick to short style for now, since Dart 3.7 that introduces tall style hasn't released on stable yet. In the future, we'd probably want to find a way to read the current project's language version and use that instead.

@dcharkes
Copy link
Collaborator

I set the formatter that runs on the generated code to stick to short style for now, since Dart 3.7 that introduces tall style hasn't released on stable yet. In the future, we'd probably want to find a way to read the current project's language version and use that instead.

👍

As soon as Dart 3.7 is out. I'd like to bump all the packages in this repo to 3.7 and reformat the whole repo. (It will mean that package:jni, package:ffi, and package:objective_c for the new Dart & Flutter SDK, but I think that's fine.)

@dcharkes
Copy link
Collaborator

FYI @liamappelbe @HosseinYousefi Us running the formatter from source means we're running whatever version of the formatter we use in FFIgen/JNIgen. Maybe we should consider going back go dart format so that we use the formatter of the SDK our users are using.

@dcharkes dcharkes merged commit 6456d48 into dart-lang:main Jan 24, 2025
22 checks passed
@Levi-Lesches Levi-Lesches deleted the dart-style-3 branch January 24, 2025 11:17
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