Skip to content

[c_compiler] Rename package to native_toolchain_c #87

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

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/c_compiler.md

This file was deleted.

5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/native_assets_builder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:native_assets_builder"
about: "Create a bug or file a feature request against package:native_assets_builder."
labels: "package:native_assets_builder"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/native_toolchain_c.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:native_toolchain_c"
about: "Create a bug or file a feature request against package:native_toolchain_c."
labels: "package:native_toolchain_c"
---
6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
'type-infra':
- .github/**

'package:c_compiler':
- pkgs/c_compiler/**/*

'package:native_assets_builder':
- pkgs/native_assets_builder/**/*

'package:native_assets_cli':
- pkgs/native_assets_cli/**/*

'package:native_toolchain_c':
- pkgs/native_toolchain_c/**/*
2 changes: 1 addition & 1 deletion .github/workflows/dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
matrix:
os: [ubuntu, macos, windows]
sdk: [stable, dev]
package: [c_compiler, native_assets_builder, native_assets_cli]
package: [native_assets_builder, native_assets_cli, native_toolchain_c]
exclude:
# Only run analyze against dev on one host.
- os: macos
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ building and bundling.

| Package | Description | Version |
| -------------------------------------------- | ------------------------------------------------------------------------------------------- | ------- |
| [c_compiler](pkgs/c_compiler/) | A library to invoke the native C compiler installed on the host machine. | [![pub package](https://img.shields.io/pub/v/c_compiler.svg)](https://pub.dev/packages/c_compiler) |
| [native_assets_builder](pkgs/native_assets_builder/) | A library that contains the logic for building native assets. This should not be used by users, and is used as shared implementation between dartdev and flutter_tools. | [![pub package](https://img.shields.io/pub/v/native_assets_builder.svg)](https://pub.dev/packages/native_assets_builder) |
| [native_assets_cli](pkgs/native_assets_cli/) | A library that contains the argument and file formats for implementing a native assets CLI. | [![pub package](https://img.shields.io/pub/v/native_assets_cli.svg)](https://pub.dev/packages/native_assets_cli) |
| [native_toolchain_c](pkgs/native_toolchain_c/) | A library to invoke the native C compiler installed on the host machine. | [![pub package](https://img.shields.io/pub/v/native_toolchain_c.svg)](https://pub.dev/packages/native_toolchain_c) |

<!-- ## Publishing automation
## Publishing automation

For information about our publishing automation and release process, see
https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our
[contributing](CONTRIBUTING.md) page. -->
[contributing](CONTRIBUTING.md) page.
2 changes: 1 addition & 1 deletion pkgs/native_assets_builder/lib/src/utils/run_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:logging/logging.dart';
/// If [logger] is provided, stream stdout and stderr to it.
///
/// If [captureOutput], captures stdout and stderr.
// TODO(dacoharkes): Share between package:c_compiler and here.
// TODO(dacoharkes): Share between package:native_toolchain_c and here.
Future<RunProcessResult> runProcess({
required Uri executable,
List<String> arguments = const [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ void main() async {
//
// We could potentially run this test if we default to some compilers
// we find on the path before running the test. However, the logic for
// discovering compilers is currently hidden inside package:c_compiler.
// discovering compilers is currently hidden inside
// package:native_toolchain_c.
return;
}

Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_assets_builder/test/data/native_add/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// 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.

import 'package:c_compiler/c_compiler.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

const packageName = 'native_add';

Expand Down
4 changes: 2 additions & 2 deletions pkgs/native_assets_builder/test/data/native_add/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
c_compiler:
path: ../../../../c_compiler/
cli_config: ^0.1.1
logging: ^1.1.1
native_assets_cli: ^0.1.0
native_toolchain_c:
path: ../../../../native_toolchain_c/

dev_dependencies:
ffigen: ^8.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// 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.

import 'package:c_compiler/c_compiler.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

const packageName = 'native_add';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
c_compiler:
path: ../../../../c_compiler/
cli_config: ^0.1.1
logging: ^1.1.1
native_assets_cli: ^0.1.0
native_toolchain_c:
path: ../../../../native_toolchain_c/

dev_dependencies:
ffigen: ^8.0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// 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.

import 'package:c_compiler/c_compiler.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

const packageName = 'native_subtract';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
c_compiler:
path: ../../../../c_compiler/
cli_config: ^0.1.1
logging: ^1.1.1
native_assets_cli: ^0.1.0
native_toolchain_c:
path: ../../../../native_toolchain_c/

dev_dependencies:
ffigen: ^8.0.2
Expand Down
6 changes: 3 additions & 3 deletions pkgs/native_assets_cli/example/native_add_library/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// 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.

import 'package:c_compiler/c_compiler.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';

const packageName = 'native_add_library';

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

// Configure `package:c_compiler` to build the C code for us.
// Configure `package:native_toolchain_c` to build the C code for us.
final cbuilder = CBuilder.library(
name: packageName,
assetName: 'package:$packageName/${packageName}.dart',
Expand All @@ -25,7 +25,7 @@ void main(List<String> args) async {
);
await cbuilder.run(
buildConfig: buildConfig,
// `package:c_compiler` will output the dynamic or static libraries it built,
// `package:native_toolchain_c` will output the dynamic or static libraries it built,
// what files it accessed (for caching the build), etc.
buildOutput: buildOutput,
logger: Logger('')..onRecord.listen((record) => print(record.message)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ environment:
sdk: '>=3.0.0 <4.0.0'

dependencies:
c_compiler:
path: ../../../c_compiler/
cli_config: ^0.1.1
logging: ^1.1.1
native_assets_cli: ^0.1.0
native_toolchain_c:
path: ../../../native_toolchain_c/

dev_dependencies:
ffigen: ^8.0.2
lints: ^2.0.0
test: ^1.21.0

dependency_overrides:
c_compiler:
path: ../../../c_compiler/
native_toolchain_c:
path: ../../../native_toolchain_c/
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![dart](https://github.com/dart-lang/native/actions/workflows/dart.yaml/badge.svg)](https://github.com/dart-lang/native/actions/workflows/dart.yaml)
[![Coverage Status](https://coveralls.io/repos/github/dart-lang/native/badge.svg?branch=main)](https://coveralls.io/github/dart-lang/native?branch=main)
[![pub package](https://img.shields.io/pub/v/c_compiler.svg)](https://pub.dev/packages/c_compiler)
[![package publisher](https://img.shields.io/pub/publisher/c_compiler.svg)](https://pub.dev/packages/c_compiler/publisher)
[![pub package](https://img.shields.io/pub/v/native_toolchain_c.svg)](https://pub.dev/packages/native_toolchain_c)
[![package publisher](https://img.shields.io/pub/publisher/native_toolchain_c.svg)](https://pub.dev/packages/native_toolchain_c/publisher)

A library to invoke the native C compiler installed on the host machine.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: c_compiler
name: native_toolchain_c
description: >-
A library to invoke the native C compiler installed on the host machine.
version: 0.1.0
repository: https://github.com/dart-lang/native/tree/main/pkgs/c_compiler
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_toolchain_c

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ library;

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ library;

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ library;

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ library;

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ library;

import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/native_toolchain/msvc.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/native_toolchain/msvc.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ library;
import 'dart:ffi';
import 'dart:io';

import 'package:c_compiler/c_compiler.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
})
library;

import 'package:c_compiler/src/cbuilder/compiler_resolver.dart';
import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
import 'package:c_compiler/src/native_toolchain/clang.dart';
import 'package:c_compiler/src/native_toolchain/msvc.dart';
import 'package:c_compiler/src/tool/tool_error.dart';
import 'package:collection/collection.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/src/cbuilder/compiler_resolver.dart';
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
import 'package:native_toolchain_c/src/native_toolchain/clang.dart';
import 'package:native_toolchain_c/src/native_toolchain/msvc.dart';
import 'package:native_toolchain_c/src/tool/tool_error.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import 'dart:async';
import 'dart:io';

import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
import 'package:c_compiler/src/utils/run_process.dart';
import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
import 'package:native_toolchain_c/src/utils/run_process.dart';
import 'package:test/test.dart';

const keepTempKey = 'KEEP_TEMPORARY_DIRECTORIES';
Expand Down Expand Up @@ -84,7 +84,7 @@ Uri findPackageRoot(String packageName) {
"'${Directory.current.uri.toFilePath()}'.");
}

Uri packageUri = findPackageRoot('c_compiler');
Uri packageUri = findPackageRoot('native_toolchain_c');

extension on Uri {
String get name => pathSegments.where((e) => e != '').last;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ library;

import 'dart:io';

import 'package:c_compiler/src/native_toolchain/apple_clang.dart';
import 'package:c_compiler/src/tool/tool_requirement.dart';
import 'package:native_toolchain_c/src/native_toolchain/apple_clang.dart';
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:test/test.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ library;

import 'dart:io';

import 'package:c_compiler/src/native_toolchain/clang.dart';
import 'package:c_compiler/src/tool/tool_instance.dart';
import 'package:c_compiler/src/tool/tool_requirement.dart';
import 'package:native_toolchain_c/src/native_toolchain/clang.dart';
import 'package:native_toolchain_c/src/tool/tool_instance.dart';
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:test/test.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ library;

import 'dart:io';

import 'package:c_compiler/src/native_toolchain/gcc.dart';
import 'package:c_compiler/src/tool/tool.dart';
import 'package:c_compiler/src/tool/tool_requirement.dart';
import 'package:c_compiler/src/tool/tool_resolver.dart';
import 'package:native_toolchain_c/src/native_toolchain/gcc.dart';
import 'package:native_toolchain_c/src/tool/tool.dart';
import 'package:native_toolchain_c/src/tool/tool_requirement.dart';
import 'package:native_toolchain_c/src/tool/tool_resolver.dart';
import 'package:test/test.dart';

import '../helpers.dart';
Expand Down
Loading