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

Merge package:ffigen into dart-lang/native #185

Merged
merged 283 commits into from
Nov 14, 2023
Merged

Conversation

liamappelbe
Copy link
Contributor

@liamappelbe liamappelbe commented Nov 2, 2023

Do NOT squash merge!

Fixes #437

Following the steps from dart-lang/tools#100

Current step:

  1. Create a pull request and get it reviewed. Do not submit through the github UI, since it does not allow a fast forward merge. If there are changes required, back out and start over (it's OK to force push to the PR branch)

We decided to defer this step until a follow up PR, to make it easier to review:

  1. Replace paths and links in files
    1. Badges: https://github.com/dart-lang/ffigen/actions/workflows/test-package.yml -> https://github.com/dart-lang/native/actions/workflows/ffigen.yml
    2. Remaining links, manually check if this does the right thing, otherwise insert steps above this step. https://github.com/dart-lang/ffigen -> https://github.com/dart-lang/native/tree/main/pkgs/ffigen

Steps to do:

  1. Disable squash-only in GitHub settings, and merge with a fast forward merge to the main branch, enable squash-only in GitHub settings.
  2. Push tags to github
  3. Follow up with a PR adding links to the top-level readme table.
  4. Add a commit to https://github.com/dart-lang/ffigen/ with it's readme pointing to this repo
  5. Archive https://github.com/dart-lang/ffigen/.

Renamed tags

  • [new tag] ffigen-v7.2.11 -> ffigen-v7.2.11
  • [new tag] ffigen-v5.0.0 -> ffigen-v5.0.0
  • [new tag] ffigen-v5.0.1 -> ffigen-v5.0.1
  • [new tag] ffigen-v6.0.0 -> ffigen-v6.0.0
  • [new tag] ffigen-v6.0.1 -> ffigen-v6.0.1
  • [new tag] ffigen-v6.0.2 -> ffigen-v6.0.2
  • [new tag] ffigen-v6.1.0 -> ffigen-v6.1.0
  • [new tag] ffigen-v6.1.1 -> ffigen-v6.1.1
  • [new tag] ffigen-v6.1.2 -> ffigen-v6.1.2
  • [new tag] ffigen-v7.0.0 -> ffigen-v7.0.0
  • [new tag] ffigen-v7.1.0 -> ffigen-v7.1.0
  • [new tag] ffigen-v7.2.0 -> ffigen-v7.2.0
  • [new tag] ffigen-v7.2.1 -> ffigen-v7.2.1
  • [new tag] ffigen-v7.2.10 -> ffigen-v7.2.10
  • [new tag] ffigen-v7.2.2 -> ffigen-v7.2.2
  • [new tag] ffigen-v7.2.3 -> ffigen-v7.2.3
  • [new tag] ffigen-v7.2.4 -> ffigen-v7.2.4
  • [new tag] ffigen-v7.2.5 -> ffigen-v7.2.5
  • [new tag] ffigen-v7.2.6 -> ffigen-v7.2.6
  • [new tag] ffigen-v7.2.7 -> ffigen-v7.2.7
  • [new tag] ffigen-v7.2.8 -> ffigen-v7.2.8
  • [new tag] ffigen-v7.2.9 -> ffigen-v7.2.9
  • [new tag] ffigen-v8.0.0 -> ffigen-v8.0.0
  • [new tag] ffigen-v8.0.0-dev.0 -> ffigen-v8.0.0-dev.0
  • [new tag] ffigen-v8.0.0-dev.1 -> ffigen-v8.0.0-dev.1
  • [new tag] ffigen-v8.0.0-dev.2 -> ffigen-v8.0.0-dev.2
  • [new tag] ffigen-v8.0.0-dev.3 -> ffigen-v8.0.0-dev.3
  • [new tag] ffigen-v8.0.1 -> ffigen-v8.0.1
  • [new tag] ffigen-v8.0.2 -> ffigen-v8.0.2
  • [new tag] ffigen-v9.0.0 -> ffigen-v9.0.0
  • [new tag] ffigen-v9.0.1 -> ffigen-v9.0.1

mannprerak2 and others added 30 commits August 20, 2020 12:24
* Fix missing typedef dependencies of func and struct

* added tests

* update version, changelog
* Added fallback to flutter format if dartfmt is not found

* added red color for severe, green for success in log printing

* Only catch ProcessException when calling dartfmt

* used package:cli_utils for finding dart_sdk and ansi colors

* use path.join
…pec.yaml (#88)

* removed dart:cli usage, use dylib version from pubspec.lock
* Bool datatype is now mapped to Uint8, Added test in native_test

* Added dart-bool to config, bools in function parameters and return type now use dart bool instead of int by default
…#96)

* added support for including/excluding/renaming unnamed_enums

 added faq, update version, changelog, update test

* fix typo
Fixed code block indentation issue in configuration table.
* Fixed issues with macros with value double.infinity and double.NaN
* Iterate over all typedefs rather than jumping to the base type.
* Added typedef-map to config.
* Updated version, changelog, and readme.
* Migrated code to pass the null safe syntax.
* Generating null safe code.
* Removed usage of --no-sound-null-safety flag
* Update version, changelog
* Use flag when running tests on travis
* WIP static functions

* Revert old code gen changes

* Refactor function code gen

* Arg and return conversions

* fix bugs

* Fix analysis, add more tests

* fmt

* Fix autorelease pool test

* Handle NS_RETURNS_RETAINED

* Daco's comments
@liamappelbe liamappelbe requested a review from dcharkes November 2, 2023 03:03
@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Nov 2, 2023
@dcharkes
Copy link
Collaborator

dcharkes commented Nov 2, 2023

Thanks @liamappelbe!

It looks like the coverage configuration and the changelog need to be updated, see redness on the bots.

@mit-mit
Copy link
Member

mit-mit commented Nov 2, 2023

After this lands, please also update the table https://github.com/dart-lang/native/blob/main/README.md#packages

@devoncarew
Copy link
Member

Do NOT squash merge!

@dcharkes - I believe you have sufficient permissions for this repo to temporarily enable 'Allow rebase merging', merge this PR, and then disable rebase merging. Let me know if this is not the case -

@mit-mit
Copy link
Member

mit-mit commented Nov 2, 2023

If not, Daco just ping me and I can help with that.

@dcharkes
Copy link
Collaborator

dcharkes commented Nov 2, 2023

Do NOT squash merge!

@dcharkes - I believe you have sufficient permissions for this repo to temporarily enable 'Allow rebase merging', merge this PR, and then disable rebase merging. Let me know if this is not the case -

I do indeed.

(But we'll have to address the redness on coverage and the publishing bot first.)

@liamappelbe
Copy link
Contributor Author

Not sure what to do about this error. Seems like this validator doesn't understand dev versions. Unless someone has a workaround, we'll have to wait to merge the repos until after SDK 3.2 is published.

  Resolving dependencies...
  The current Dart SDK version is 3.1.5.
  
  Because ffigen requires SDK version >=3.2.0-114.0.dev <4.0.0, version solving failed.

@dcharkes
Copy link
Collaborator

dcharkes commented Nov 3, 2023

@liamappelbe try setting the channel to beta in .github/workflows/publish.yaml (and update FFIgen to beta instead of dev). docs: https://github.com/dart-lang/ecosystem/blob/main/.github/workflows/publish.yaml#L60-L67

Copy link

github-actions bot commented Nov 8, 2023

Package publishing

Package Version Status Publish tag (post-merge)
package:ffigen 10.0.0-dev.0 ready to publish ffigen-v10.0.0-dev.0
package:native_toolchain_c 0.3.2 already published at pub.dev
package:native_assets_builder 0.3.0 already published at pub.dev
package:native_assets_cli 0.3.2 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@coveralls
Copy link

coveralls commented Nov 9, 2023

Coverage Status

coverage: 91.903% (-6.1%) from 97.992%
when pulling ff47496 on merge-ffigen-package
into eaea725 on main.

@liamappelbe
Copy link
Contributor Author

@dcharkes Fixed the publish bot. PTAL

@dcharkes
Copy link
Collaborator

dcharkes commented Nov 9, 2023

@dcharkes Fixed the publish bot. PTAL

Nice! Both the publisher and code coverage tool is happy!

Regarding CLA bot, the two non-signed CLAs are ex Googlers who contributed during their time at Google, so these should be fine. Please submit an exception request following the link to the bot.

Before I manually merge, as we can only do this once, and commits are not squashed:

  • Can we land some required changes on the FFIgen repo first? (e.g. the fix Dart formatting+beta SDK, and the fix markdown formatting)
  • Should we consider also prefixing all commits with [ffigen] ? --commit-callback some examples.
  • Can we squash the commits that have not been merged into the FFIgen repo before the merge commit and the ones after the merge commit into one commit? (or one commit before and one after)? Also please write detailed commit messages on these, they will be in our history forever.
  • Smaller nit:
    • Can we delete pkgs/ffigen/.github/workflows/test-package.yaml in the same commit as adding ./github/workflows/ffigen.yaml
  • Merge with the last commit in dart-lang/native

@liamappelbe
Copy link
Contributor Author

@dcharkes Ok, done. Should be good to go now. It's Friday afternoon here, so feel free to merge this during my weekend if it looks good.

@dcharkes
Copy link
Collaborator

The urls don't look correct: https://github.com/dart-lang/native/tree/main/pkgs/ffigen/blob/main/test/native_test/native_test.dart should be https://github.com/dart-lang/native/tree/main/pkgs/ffigen/test/native_test/native_test.dart.

https://github.com/dart-lang/native/tree/main/pkgs/ffigen/issues/386 we can only rewrite the URLs for issues after we have migrated the issues. Though it might be that the old URLs for issues will still work, so in that case we can just keep the old URLs and let GitHub just forward to the migrated issue.

https://github.com/dart-lang/native/tree/main/pkgs/ffigen/pull/402#issuecomment-1154348670 This should definitely stay the old URL.

Also, can we do the README header rewrite and the SDK to beta bump as a PR on the FFIgen repo first? That means less reviewing on the commits manually.

It's Friday afternoon here, so feel free to merge this during my weekend if it looks good.

I'd rather do it on Monday, who knows we might miss something and need to do some cleanup. 🙄

At least we need to transfer all issues, issue labels, label the issues with package:ffigen etc. (I can't find anything on transfering all issues to another repo at the same time. So we're going to have to hit "transfer issue" 85 times manually. Unless, @devoncarew knows some magic?)

@parlough
Copy link
Member

parlough commented Nov 10, 2023

At least we need to transfer all issues, issue labels, label the issues with package:ffigen etc. (I can't find anything on transfering all issues to another repo at the same time. So we're going to have to hit "transfer issue" 85 times manually. Unless, devoncarew knows some magic?)

Devon does have some magic prepared. The repo_manage tool has a transfer-issues bulk transfer command that can add a specific label if desired.

@devoncarew
Copy link
Member

At least we need to transfer all issues, issue labels, label the issues with package:ffigen etc. (I can't find anything on transfering all issues to another repo at the same time. So we're going to have to hit "transfer issue" 85 times manually. Unless, devoncarew knows some magic?)

Devon does have some magic prepared. The repo_manage tool has a transfer-issues bulk transfer command that can add a specific label if desired.

Yup, from memory , there are a few ways to x-fer issues in bulk. Moritz wrote the one in the repo_manage tool. I believe he said that it would occasionally fail after some number of issues, but that that was harmless? You can you capture more of the moves w/ a subsequent run.

You definitely do want to have an additional label to help categorize the issues.

Also:
- Delete dependabot.yml
- Rename test-package.yml to ffigen.yml, and modify it to use
  pkgs/ffigen as its working dir
This is needed because the ffigen package depends on the beta
version of the SDK.
@liamappelbe
Copy link
Contributor Author

@dcharkes PTAL

@dcharkes dcharkes merged commit 29e423c into main Nov 14, 2023
9 checks passed
@dcharkes dcharkes deleted the merge-ffigen-package branch November 14, 2023 10:40
HosseinYousefi pushed a commit that referenced this pull request Nov 16, 2023
Merge package:ffigen into dart-lang/native
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge ffigen into dart-lang/native