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] Prepare to publish v18 #2083

Merged
merged 3 commits into from
Mar 11, 2025
Merged

[ffigen] Prepare to publish v18 #2083

merged 3 commits into from
Mar 11, 2025

Conversation

liamappelbe
Copy link
Contributor

I also added a checkOsVersion function to package:objective_c that makes it easier to write version checks.

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
objective_c Breaking 6.0.0 7.0.0 7.0.0 ✔️
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
objective_c _Version

This check can be disabled by tagging the PR with skip-leaking-check.

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 Mar 10, 2025

Coverage Status

coverage: 88.618% (+0.02%) from 88.6%
when pulling a2912a7 on pub18
into 318f841 on main.

@liamappelbe liamappelbe requested review from dcharkes and removed request for HosseinYousefi March 10, 2025 09:53
///
/// The each platform's version is optional, and the function returns false if
/// no version is provided for the current platform.
bool checkOsVersion({Version? iOS, Version? macOS}) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If our users ever need to check upper OS versions they can't use this and it would make our API asymmetric. If PlatformAvailability is too verbose then maybe make the function name more specific so that we can introduce something else for the general case later.

  • bool checkMinimumOS(...) ?

Nit: OS should be capitalized in Dart style.

Copy link
Contributor Author

@liamappelbe liamappelbe Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a replacement for ObjC's @available check, which only checks the minimum version. Users can use the else case of their if statement to give a fallback method for older APIs.

Renamed it to checkOSVersion

@liamappelbe liamappelbe merged commit 2dba4f5 into main Mar 11, 2025
22 of 23 checks passed
@liamappelbe liamappelbe deleted the pub18 branch March 11, 2025 02: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