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

Only Build The Specific Executable In Dockerfile #148

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

MahdiBM
Copy link
Contributor

@MahdiBM MahdiBM commented Jan 3, 2025

No description provided.

@MahdiBM MahdiBM requested review from 0xTim and gwynne as code owners January 3, 2025 20:18
@gwynne
Copy link
Member

gwynne commented Jan 3, 2025

Why?

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 3, 2025

@gwynne why build stuff that won't be needed anyway?

@gwynne
Copy link
Member

gwynne commented Jan 3, 2025

I feel like this could result in tripping people up in a non-obvious way.

@gwynne
Copy link
Member

gwynne commented Jan 3, 2025

Not to mention there's nothing else to build in the template to begin with.

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 3, 2025

It's not like Swift's build system is fast and users won't need this.

I've been using --product in a lot of places for building, it doesn't really mess anything up as long as you're not counting on it building everything (excluding test targets) (which the Dockerfile doesn't)

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 3, 2025

@gwynne should investigate adding some kind of CI for the Dockerfile?

@gwynne
Copy link
Member

gwynne commented Jan 3, 2025

It also adds another place where users need to change the name App if they change their executable name.

@gwynne
Copy link
Member

gwynne commented Jan 3, 2025

(Granted, it is possible to set up the Dockerfile in such a way that the name is not quite so hardcoded, but doing so complicates it so much as to make it unapproachable for editing.)

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Jan 3, 2025

@gwynne that's actually what i was going to change next

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Have to say I'm actually in favour of this

Dockerfile Outdated Show resolved Hide resolved
Co-authored-by: Tim Condon <[email protected]>
Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

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

🤷‍♀️

@MahdiBM MahdiBM merged commit d24c31b into main Jan 4, 2025
19 checks passed
@MahdiBM MahdiBM deleted the mmbm-build-product-only branch January 4, 2025 00:12
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.

3 participants