Skip to content

Commit fb701e3

Browse files
authored
[c_compiler] Rename package to native_toolchain_c (#87)
1 parent 81a0ad1 commit fb701e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+104
-98
lines changed

.github/ISSUE_TEMPLATE/c_compiler.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Lines changed: 5 additions & 0 deletions

.github/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
'type-infra':
44
- .github/**
55

6-
'package:c_compiler':
7-
- pkgs/c_compiler/**/*
8-
96
'package:native_assets_builder':
107
- pkgs/native_assets_builder/**/*
118

129
'package:native_assets_cli':
1310
- pkgs/native_assets_cli/**/*
11+
12+
'package:native_toolchain_c':
13+
- pkgs/native_toolchain_c/**/*

.github/workflows/dart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
os: [ubuntu, macos, windows]
2323
sdk: [stable, dev]
24-
package: [c_compiler, native_assets_builder, native_assets_cli]
24+
package: [native_assets_builder, native_assets_cli, native_toolchain_c]
2525
exclude:
2626
# Only run analyze against dev on one host.
2727
- os: macos

README.md

Lines changed: 3 additions & 3 deletions

pkgs/native_assets_builder/lib/src/utils/run_process.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:logging/logging.dart';
1313
/// If [logger] is provided, stream stdout and stderr to it.
1414
///
1515
/// If [captureOutput], captures stdout and stderr.
16-
// TODO(dacoharkes): Share between package:c_compiler and here.
16+
// TODO(dacoharkes): Share between package:native_toolchain_c and here.
1717
Future<RunProcessResult> runProcess({
1818
required Uri executable,
1919
List<String> arguments = const [],

pkgs/native_assets_builder/test/build_runner/build_runner_run_in_isolation_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ void main() async {
3131
//
3232
// We could potentially run this test if we default to some compilers
3333
// we find on the path before running the test. However, the logic for
34-
// discovering compilers is currently hidden inside package:c_compiler.
34+
// discovering compilers is currently hidden inside
35+
// package:native_toolchain_c.
3536
return;
3637
}
3738

pkgs/native_assets_builder/test/data/native_add/build.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:c_compiler/c_compiler.dart';
65
import 'package:logging/logging.dart';
76
import 'package:native_assets_cli/native_assets_cli.dart';
7+
import 'package:native_toolchain_c/native_toolchain_c.dart';
88

99
const packageName = 'native_add';
1010

pkgs/native_assets_builder/test/data/native_add/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ environment:
88
sdk: '>=3.0.0 <4.0.0'
99

1010
dependencies:
11-
c_compiler:
12-
path: ../../../../c_compiler/
1311
cli_config: ^0.1.1
1412
logging: ^1.1.1
1513
native_assets_cli: ^0.1.0
14+
native_toolchain_c:
15+
path: ../../../../native_toolchain_c/
1616

1717
dev_dependencies:
1818
ffigen: ^8.0.2

pkgs/native_assets_builder/test/data/native_add_add_source/build.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:c_compiler/c_compiler.dart';
65
import 'package:logging/logging.dart';
76
import 'package:native_assets_cli/native_assets_cli.dart';
7+
import 'package:native_toolchain_c/native_toolchain_c.dart';
88

99
const packageName = 'native_add';
1010

pkgs/native_assets_builder/test/data/native_add_add_source/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ environment:
88
sdk: '>=3.0.0 <4.0.0'
99

1010
dependencies:
11-
c_compiler:
12-
path: ../../../../c_compiler/
1311
cli_config: ^0.1.1
1412
logging: ^1.1.1
1513
native_assets_cli: ^0.1.0
14+
native_toolchain_c:
15+
path: ../../../../native_toolchain_c/
1616

1717
dev_dependencies:
1818
ffigen: ^8.0.2

pkgs/native_assets_builder/test/data/native_subtract/build.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:c_compiler/c_compiler.dart';
65
import 'package:logging/logging.dart';
76
import 'package:native_assets_cli/native_assets_cli.dart';
7+
import 'package:native_toolchain_c/native_toolchain_c.dart';
88

99
const packageName = 'native_subtract';
1010

pkgs/native_assets_builder/test/data/native_subtract/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ environment:
88
sdk: '>=3.0.0 <4.0.0'
99

1010
dependencies:
11-
c_compiler:
12-
path: ../../../../c_compiler/
1311
cli_config: ^0.1.1
1412
logging: ^1.1.1
1513
native_assets_cli: ^0.1.0
14+
native_toolchain_c:
15+
path: ../../../../native_toolchain_c/
1616

1717
dev_dependencies:
1818
ffigen: ^8.0.2

pkgs/native_assets_cli/example/native_add_library/build.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'package:c_compiler/c_compiler.dart';
65
import 'package:logging/logging.dart';
76
import 'package:native_assets_cli/native_assets_cli.dart';
7+
import 'package:native_toolchain_c/native_toolchain_c.dart';
88

99
const packageName = 'native_add_library';
1010

@@ -15,7 +15,7 @@ void main(List<String> args) async {
1515
final buildConfig = await BuildConfig.fromArgs(args);
1616
final buildOutput = BuildOutput();
1717

18-
// Configure `package:c_compiler` to build the C code for us.
18+
// Configure `package:native_toolchain_c` to build the C code for us.
1919
final cbuilder = CBuilder.library(
2020
name: packageName,
2121
assetName: 'package:$packageName/${packageName}.dart',
@@ -25,7 +25,7 @@ void main(List<String> args) async {
2525
);
2626
await cbuilder.run(
2727
buildConfig: buildConfig,
28-
// `package:c_compiler` will output the dynamic or static libraries it built,
28+
// `package:native_toolchain_c` will output the dynamic or static libraries it built,
2929
// what files it accessed (for caching the build), etc.
3030
buildOutput: buildOutput,
3131
logger: Logger('')..onRecord.listen((record) => print(record.message)),

pkgs/native_assets_cli/example/native_add_library/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ environment:
99
sdk: '>=3.0.0 <4.0.0'
1010

1111
dependencies:
12-
c_compiler:
13-
path: ../../../c_compiler/
1412
cli_config: ^0.1.1
1513
logging: ^1.1.1
1614
native_assets_cli: ^0.1.0
15+
native_toolchain_c:
16+
path: ../../../native_toolchain_c/
1717

1818
dev_dependencies:
1919
ffigen: ^8.0.2
2020
lints: ^2.0.0
2121
test: ^1.21.0
2222

2323
dependency_overrides:
24-
c_compiler:
25-
path: ../../../c_compiler/
24+
native_toolchain_c:
25+
path: ../../../native_toolchain_c/
File renamed without changes.
File renamed without changes.

pkgs/c_compiler/README.md renamed to pkgs/native_toolchain_c/README.md

Lines changed: 2 additions & 2 deletions

pkgs/c_compiler/pubspec.yaml renamed to pkgs/native_toolchain_c/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
name: c_compiler
1+
name: native_toolchain_c
22
description: >-
33
A library to invoke the native C compiler installed on the host machine.
44
version: 0.1.0
5-
repository: https://github.com/dart-lang/native/tree/main/pkgs/c_compiler
5+
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_toolchain_c
66

77
environment:
88
sdk: '>=3.0.0 <4.0.0'

pkgs/c_compiler/test/cbuilder/cbuilder_build_failure_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_build_failure_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ library;
1010

1111
import 'dart:io';
1212

13-
import 'package:c_compiler/c_compiler.dart';
1413
import 'package:native_assets_cli/native_assets_cli.dart';
14+
import 'package:native_toolchain_c/native_toolchain_c.dart';
1515
import 'package:test/test.dart';
1616

1717
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_cross_android_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_android_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
import 'dart:io';
66

7-
import 'package:c_compiler/c_compiler.dart';
8-
import 'package:c_compiler/src/utils/run_process.dart';
97
import 'package:native_assets_cli/native_assets_cli.dart';
8+
import 'package:native_toolchain_c/native_toolchain_c.dart';
9+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1010
import 'package:test/test.dart';
1111

1212
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_cross_ios_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_ios_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ library;
1010

1111
import 'dart:io';
1212

13-
import 'package:c_compiler/c_compiler.dart';
14-
import 'package:c_compiler/src/utils/run_process.dart';
1513
import 'package:native_assets_cli/native_assets_cli.dart';
14+
import 'package:native_toolchain_c/native_toolchain_c.dart';
15+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1616
import 'package:test/test.dart';
1717

1818
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_cross_linux_host_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_linux_host_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ library;
77

88
import 'dart:io';
99

10-
import 'package:c_compiler/c_compiler.dart';
11-
import 'package:c_compiler/src/utils/run_process.dart';
1210
import 'package:native_assets_cli/native_assets_cli.dart';
11+
import 'package:native_toolchain_c/native_toolchain_c.dart';
12+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1313
import 'package:test/test.dart';
1414

1515
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_cross_macos_host_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_macos_host_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ library;
1010

1111
import 'dart:io';
1212

13-
import 'package:c_compiler/c_compiler.dart';
14-
import 'package:c_compiler/src/utils/run_process.dart';
1513
import 'package:native_assets_cli/native_assets_cli.dart';
14+
import 'package:native_toolchain_c/native_toolchain_c.dart';
15+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1616
import 'package:test/test.dart';
1717

1818
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_cross_windows_host_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_cross_windows_host_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ library;
1010

1111
import 'dart:io';
1212

13-
import 'package:c_compiler/c_compiler.dart';
14-
import 'package:c_compiler/src/native_toolchain/msvc.dart';
15-
import 'package:c_compiler/src/utils/run_process.dart';
1613
import 'package:native_assets_cli/native_assets_cli.dart';
14+
import 'package:native_toolchain_c/native_toolchain_c.dart';
15+
import 'package:native_toolchain_c/src/native_toolchain/msvc.dart';
16+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1717
import 'package:test/test.dart';
1818

1919
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/cbuilder_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/cbuilder_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ library;
1111
import 'dart:ffi';
1212
import 'dart:io';
1313

14-
import 'package:c_compiler/c_compiler.dart';
15-
import 'package:c_compiler/src/utils/run_process.dart';
1614
import 'package:native_assets_cli/native_assets_cli.dart';
15+
import 'package:native_toolchain_c/native_toolchain_c.dart';
16+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1717
import 'package:test/test.dart';
1818

1919
import '../helpers.dart';

pkgs/c_compiler/test/cbuilder/compiler_resolver_test.dart renamed to pkgs/native_toolchain_c/test/cbuilder/compiler_resolver_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
})
99
library;
1010

11-
import 'package:c_compiler/src/cbuilder/compiler_resolver.dart';
12-
import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
13-
import 'package:c_compiler/src/native_toolchain/clang.dart';
14-
import 'package:c_compiler/src/native_toolchain/msvc.dart';
15-
import 'package:c_compiler/src/tool/tool_error.dart';
1611
import 'package:collection/collection.dart';
1712
import 'package:native_assets_cli/native_assets_cli.dart';
13+
import 'package:native_toolchain_c/src/cbuilder/compiler_resolver.dart';
14+
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
15+
import 'package:native_toolchain_c/src/native_toolchain/clang.dart';
16+
import 'package:native_toolchain_c/src/native_toolchain/msvc.dart';
17+
import 'package:native_toolchain_c/src/tool/tool_error.dart';
1818
import 'package:test/test.dart';
1919

2020
import '../helpers.dart';

pkgs/c_compiler/test/helpers.dart renamed to pkgs/native_toolchain_c/test/helpers.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import 'dart:async';
66
import 'dart:io';
77

8-
import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
9-
import 'package:c_compiler/src/utils/run_process.dart';
108
import 'package:logging/logging.dart';
119
import 'package:native_assets_cli/native_assets_cli.dart';
10+
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
11+
import 'package:native_toolchain_c/src/utils/run_process.dart';
1212
import 'package:test/test.dart';
1313

1414
const keepTempKey = 'KEEP_TEMPORARY_DIRECTORIES';
@@ -84,7 +84,7 @@ Uri findPackageRoot(String packageName) {
8484
"'${Directory.current.uri.toFilePath()}'.");
8585
}
8686

87-
Uri packageUri = findPackageRoot('c_compiler');
87+
Uri packageUri = findPackageRoot('native_toolchain_c');
8888

8989
extension on Uri {
9090
String get name => pathSegments.where((e) => e != '').last;

pkgs/c_compiler/test/native_toolchain/apple_clang_test.dart renamed to pkgs/native_toolchain_c/test/native_toolchain/apple_clang_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ library;
1010

1111
import 'dart:io';
1212

13-
import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
14-
import 'package:c_compiler/src/tool/tool_requirement.dart';
13+
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
14+
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
1515
import 'package:pub_semver/pub_semver.dart';
1616
import 'package:test/test.dart';
1717

pkgs/c_compiler/test/native_toolchain/clang_test.dart renamed to pkgs/native_toolchain_c/test/native_toolchain/clang_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ library;
77

88
import 'dart:io';
99

10-
import 'package:c_compiler/src/native_toolchain/clang.dart';
11-
import 'package:c_compiler/src/tool/tool_instance.dart';
12-
import 'package:c_compiler/src/tool/tool_requirement.dart';
10+
import 'package:native_toolchain_c/src/native_toolchain/clang.dart';
11+
import 'package:native_toolchain_c/src/tool/tool_instance.dart';
12+
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
1313
import 'package:pub_semver/pub_semver.dart';
1414
import 'package:test/test.dart';
1515

pkgs/c_compiler/test/native_toolchain/gcc_test.dart renamed to pkgs/native_toolchain_c/test/native_toolchain/gcc_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ library;
77

88
import 'dart:io';
99

10-
import 'package:c_compiler/src/native_toolchain/gcc.dart';
11-
import 'package:c_compiler/src/tool/tool.dart';
12-
import 'package:c_compiler/src/tool/tool_requirement.dart';
13-
import 'package:c_compiler/src/tool/tool_resolver.dart';
10+
import 'package:native_toolchain_c/src/native_toolchain/gcc.dart';
11+
import 'package:native_toolchain_c/src/tool/tool.dart';
12+
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
13+
import 'package:native_toolchain_c/src/tool/tool_resolver.dart';
1414
import 'package:test/test.dart';
1515

1616
import '../helpers.dart';

0 commit comments

Comments
 (0)