Skip to content

Conversation

@loic-peron-inetum-public
Copy link
Contributor

see #67

@google-cla
Copy link

google-cla bot commented Aug 12, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@nex3 nex3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an unresolved tension here between what it means to enable native compilation and the possibility of cross-compiling for other platforms. As this PR is right now, this is broken: if you run pkg-standalone-windows-x64 while you're on Linux with useNative set to true, you'll get a native linux binary with a .exe extension.

I think a better approach is to interpret and document useNative specifically as only affecting the current platform. We should still expose cross-platform build tasks, and those tasks should still work. This provides users the maximum amount of flexibility.

@loic-peron-inetum-public
Copy link
Contributor Author

I renamed the option useExe to specifically use exe instead of aot for native targets, updated the documentation, and fixed the packaging.

Copy link
Collaborator

@nex3 nex3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for this as well? Specifically:

  • Test that it generates an EXE on a non-default platform when configured to do so
  • Test that it doesn't generate an EXE on a default platform when configured to do so
  • Make sure there are tests that it does the default thing correctly as well (these probably already exist)

@loic-peron-inetum-public
Copy link
Contributor Author

Can you add tests for this as well? Specifically:

  • Test that it generates an EXE on a non-default platform when configured to do so
  • Test that it doesn't generate an EXE on a default platform when configured to do so
  • Make sure there are tests that it does the default thing correctly as well (these probably already exist)

I will gladly add tests, and need some directions as to where and how I can insert these.

@nex3
Copy link
Collaborator

nex3 commented Aug 20, 2025

I will gladly add tests, and need some directions as to where and how I can insert these.

There are existing tests in test/standalone_test.dart. You should be able to copy and modify those.

@loic-peron-inetum-public
Copy link
Contributor Author

Squashed and rebased on main/2.13.0

Copy link
Collaborator

@nex3 nex3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this looks good :)

@nex3
Copy link
Collaborator

nex3 commented Aug 27, 2025

It looks like there's a failure in one of your new tests.

@loic-peron-inetum-public
Copy link
Contributor Author

It looks like there's a failure in one of your new tests.

Fixed

@nex3
Copy link
Collaborator

nex3 commented Sep 2, 2025

Can you set this PR to allow me to push to your branch?

@loic-peron-inetum-public
Copy link
Contributor Author

Can you set this PR to allow me to push to your branch?

It seems you aloready have write access: I don't have an option to allow you, and the PR has "1 change requested by reviewers with write access".

@nex3 nex3 merged commit c5cb556 into google:main Sep 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants