Skip to content

Commit 25cdb1b

Browse files
authored
Reenable mac size checks (#1001)
* Reenable mac size checks * Fix * Upgrade native toolchain * fix * Fix export * add changelog * Fix export
1 parent c45e050 commit 25cdb1b

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

.github/workflows/intl4x.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ jobs:
146146
working-directory: pkgs/intl4x/example_native
147147
if: matrix.os == 'macos-latest'
148148
run: ./build/cli/macos_arm64/bundle/bin/example_native
149+
149150
- name: Print file size and check limit for example_native (Mac)
150151
working-directory: pkgs/intl4x/example_native
151-
# skip until https://github.com/dart-lang/i18n/issues/989 issue is resolved
152-
if: matrix.os == 'macos-latest' && false
152+
if: matrix.os == 'macos-latest'
153153
run: |
154154
FILE_PATH="build/cli/macos_arm64/bundle/lib/libintl4x.dylib"
155155
FILE_SIZE=$(stat -f %z "$FILE_PATH")
@@ -236,10 +236,9 @@ jobs:
236236

237237
- name: Print file size and check limit for example_native (Mac)
238238
working-directory: pkgs/intl4x/example_native
239-
# skip until https://github.com/dart-lang/i18n/issues/989 issue is resolved
240-
if: matrix.os == 'macos-latest' && false
239+
if: matrix.os == 'macos-latest'
241240
run: |
242-
FILE_PATH="build/cli/macos_arm64/bundle/lib/example_native"
241+
FILE_PATH="build/cli/macos_arm64/bundle/lib/libintl4x.dylib"
243242
FILE_SIZE=$(stat -f %z "$FILE_PATH")
244243
echo "macOS executable size: $FILE_SIZE bytes"
245244
if [ "$FILE_SIZE" -gt 10485760 ]; then

pkgs/intl4x/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Removing `EcmaPolicy`, fixing Locale printing, and other small clean-ups.
55
- Update to `native_toolchain_c` v0.16.7.
66
- Make package compatible to run on Windows again.
7+
- Update to `native_toolchain_c` v0.17.1.
78

89
## 0.12.2
910

pkgs/intl4x/hook/link.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ${usedSymbols?.join('\n')}
9191
input.config.code.targetOS == OS.windows
9292
? const ['MSVCRT', 'ws2_32', 'userenv', 'ntdll']
9393
: const [],
94-
linkerOptions: LinkerOptions.treeshake(symbols: usedSymbols),
94+
linkerOptions: LinkerOptions.treeshake(symbolsToKeep: usedSymbols),
9595
).run(
9696
input: input,
9797
output: output,

pkgs/intl4x/lib/case_mapping.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'intl4x.dart';
66

7-
export 'src/case_mapping/case_mapping.dart';
7+
export 'src/case_mapping/case_mapping.dart' show CaseMapping;
88
export 'src/locale/locale.dart';
99

1010
extension CaseMappingWithIntl4X on String {

pkgs/intl4x/lib/intl4x.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'case_mapping.dart';
66
import 'collation.dart';
77
import 'display_names.dart';
88
import 'number_format.dart';
9+
import 'src/case_mapping/case_mapping.dart' show buildCaseMapping;
910
import 'src/case_mapping/case_mapping_impl.dart';
1011
import 'src/collation/collation.dart';
1112
import 'src/collation/collation_impl.dart';
@@ -50,7 +51,7 @@ class Intl {
5051
: locale = locale ?? findSystemLocale();
5152

5253
CaseMapping get caseMapping =>
53-
CaseMapping(CaseMappingImpl.build(locale, localeMatcher));
54+
buildCaseMapping(CaseMappingImpl.build(locale, localeMatcher));
5455

5556
Collation collation([CollationOptions options = const CollationOptions()]) =>
5657
buildCollation(CollationImpl.build(locale, options, localeMatcher));

pkgs/intl4x/lib/src/case_mapping/case_mapping.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'case_mapping_impl.dart';
1313
class CaseMapping {
1414
final CaseMappingImpl _caseMappingImpl;
1515

16-
const CaseMapping(this._caseMappingImpl);
16+
const CaseMapping._(this._caseMappingImpl);
1717

1818
String toLowerCase(String input) {
1919
if (isInTest) {
@@ -31,3 +31,6 @@ class CaseMapping {
3131
}
3232
}
3333
}
34+
35+
CaseMapping buildCaseMapping(CaseMappingImpl collationImpl) =>
36+
CaseMapping._(collationImpl);

pkgs/intl4x/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ dependencies:
2525
collection: ^1.19.1
2626
crypto: ^3.0.6
2727
ffi: ^2.1.4
28-
hooks: ^0.19.5
28+
hooks: ^0.20.0
2929
logging: ^1.3.0
3030
meta: ^1.17.0
31-
native_toolchain_c: ^0.16.7
31+
native_toolchain_c: ^0.17.1
3232
path: ^1.9.1
3333
record_use: ^0.4.1
3434

0 commit comments

Comments
 (0)