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

Infra for swift2objc #1193

Merged
merged 4 commits into from
Jun 6, 2024
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: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/swift2objc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:swift2objc"
about: "Create a bug or file a feature request against package:swift2objc."
labels: "package:swift2objc"
---
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/swiftgen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: "package:swiftgen"
about: "Create a bug or file a feature request against package:swiftgen."
labels: "package:swiftgen"
---
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@
'package:objective_c':
- changed-files:
- any-glob-to-any-file: 'pkgs/objective_c/**'

'package:swiftgen':
- changed-files:
- any-glob-to-any-file: 'pkgs/swiftgen/**'

'package:swift2objc':
- changed-files:
- any-glob-to-any-file: 'pkgs/swiftgen/swift2objc/**'
4 changes: 2 additions & 2 deletions .github/workflows/objective_c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
push:
branches: [main, stable]
paths:
- '.github/workflows/objective_c.yml'
- '.github/workflows/objective_c.yaml'
- 'pkgs/objective_c/**'
pull_request:
branches: [main, stable]
paths:
- '.github/workflows/objective_c.yml'
- '.github/workflows/objective_c.yaml'
- 'pkgs/objective_c/**'
schedule:
- cron: "0 0 * * 0"
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/swift2objc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: swift2objc

on:
# Run on PRs and pushes to the default branch.
push:
branches: [main, stable]
paths:
- '.github/workflows/swift2objc.yaml'
- 'pkgs/swiftgen/swift2objc/**'
pull_request:
branches: [main, stable]
paths:
- '.github/workflows/swift2objc.yaml'
- 'pkgs/swiftgen/swift2objc/**'
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github

jobs:
# Check code formatting and static analysis.
analyze:
runs-on: macos-latest
defaults:
run:
working-directory: pkgs/swiftgen/swift2objc/
strategy:
fail-fast: false
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
with:
sdk: stable
- id: install
name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import 'confomingable.dart';
import 'declaration.dart';
import 'genericable.dart';

/// An interface for describing the declaration of a Swift enum. See `NormalEnumDeclaration`,
/// An interface for describing the declaration of a Swift enum. See `NormalEnumDeclaration`,
/// `AssociatedValueEnumDeclaration` and `RawValueEnumDeclaration` for concrete implementations.
abstract interface class EnumDeclaration
implements Declaration, Genericable, Conformingable {
abstract List<EnumCase> cases;
}


/// An interface describing an enum case. See `NormalEnumCase`, `AssociatedValueEnumCase`
/// An interface describing an enum case. See `NormalEnumCase`, `AssociatedValueEnumCase`
/// and `RawValueEnumCase` for concrete implementations.
abstract interface class EnumCase implements Declaration {}
6 changes: 0 additions & 6 deletions pkgs/swiftgen/swift2objc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ environment:
sdk: '>=3.3.0 <4.0.0'

dependencies:
ffi: ^2.1.0

dev_dependencies:
ffigen: ^11.0.0
test: ^1.21.1

dependency_overrides:
ffigen:
path: ../ffigen/