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

Add WinOS console+GUI hybrid back into build/production #779

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

rivy
Copy link
Contributor

@rivy rivy commented Aug 21, 2022

Fixes #778.

@rivy rivy changed the title Add windows console+GUI hybrid back into build/production Add WinOS console+GUI hybrid back into build/production Aug 21, 2022
@rivy
Copy link
Contributor Author

rivy commented Aug 24, 2022

Essentially all tests are successful; the only failure was a network timeout failure during preliminary OCaml install/setup.

# create and stage text+gui hybrid for Windows
case '${{ matrix.job.os }}' in windows-*)
# * clean/remove build artifact(s)
opam exec -- make -C src clean ## .or.# opam exec -- make clean #.or.# rm "src/${project_exe_stem}${{ steps.vars.outputs.EXE_suffix }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think rm "src/${project_exe_stem}${{ steps.vars.outputs.EXE_suffix }}" is plenty sufficient here. Just to avoid the entire rebuild. (The designation as console or GUI application happens at link time, so rebuild is not needed.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, since it's only a link step change, I thought that myself. But I wasn't completely sure, so I implemented it as a half measure of rebuild. With just the 'src' clean, the recompilation literally completes within seconds and doesn't change the total build time in any real way, so I left it.

I'll change to the rm ... and re-push if you think its warranted.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking a bit more about it, perhaps a more relevant improvement is to make this new code a separate job step guarded by an if: runner.os == 'Windows'. I think this makes the build log easier to follow should anything fail. It also makes the scripts simpler (trying to go for a universal build script with GTK on Win is kind of futile at this point, something we have to live with).

@tleedjarv
Copy link
Contributor

In general it looks fine to me. Just one comment (see above) but even that is not too important. It would mainly help with GHA build times.

@rivy rivy force-pushed the x.fix-win-hybrid branch from a4701e2 to 9fa515d Compare August 28, 2022 16:00
@rivy
Copy link
Contributor Author

rivy commented Aug 28, 2022

I pushed a change. Let mw know if that's the direction you meant.

@rivy rivy force-pushed the x.fix-win-hybrid branch from 9fa515d to 3212340 Compare August 28, 2022 16:12
@tleedjarv
Copy link
Contributor

This looks good to me (assuming the build completes).

Just one remark: make sure not to change whitespace in the later portions of the yml as those are literal patches there any may fail to apply when changed.

@gdt
Copy link
Collaborator

gdt commented Aug 28, 2022

I'm watching and am fuzzy on the details, but that's ok -- when you two agree it's ready and CI passes I'll hit merge.

@rivy
Copy link
Contributor Author

rivy commented Aug 29, 2022

Just one remark: make sure not to change whitespace in the later portions of the yml as those are literal patches there any may fail to apply when changed.

I've got "format on save" enabled on my editor, so I have to specifically "save without reformatting". And, sometimes, my hardwired ctrl-s fires off without actual my conscious thought. 😄

I'll reformat the PR commit(s), keeping whitespace otherwise intact.

@rivy rivy force-pushed the x.fix-win-hybrid branch from 3212340 to c274288 Compare August 30, 2022 13:23
@rivy
Copy link
Contributor Author

rivy commented Sep 1, 2022

All tests passing. No extraneous whitespace changes.
I believe it is done.
OK to merge?

@tleedjarv
Copy link
Contributor

You missed one nit comment (#779 (comment)), or maybe not :)

Either way, looks good to me.

I'm not too sure about the confusion that the users must have with three exe-s. Then again, that confusion is already there with two exe-s, I guess. It could be simpler for first-time (click-starting) users. It's not in scope of this PR, of course.

@rivy rivy force-pushed the x.fix-win-hybrid branch 2 times, most recently from 3212340 to 7724c31 Compare September 1, 2022 14:07
@rivy
Copy link
Contributor Author

rivy commented Sep 1, 2022

I didn't see the note (likely, I was posting from an un-updated page).
Anyway, final update with the change is pushed and now in CI.

@gdt
Copy link
Collaborator

gdt commented Sep 1, 2022

Ci hasn't quite passed but I'm going to merge anyway, as the Windows CI infrastructure just seems too flaky.

@gdt gdt merged commit 8569b0d into bcpierce00:master Sep 1, 2022
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.

🐛(WinOS) unison (gui/gtk) has lost all console output (between v2.51.4 and v2.51.5)
3 participants