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

fix(ios): sample build script --debug detection #10953

Merged
merged 4 commits into from
Apr 17, 2024
Merged

Conversation

jahorton
Copy link
Contributor

@jahorton jahorton commented Mar 6, 2024

@jahorton jahorton requested a review from sgschantz as a code owner March 6, 2024 03:08
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Mar 6, 2024

User Test Results

Test specification and instructions

User tests are not required

if builder_is_debug_build; then
# `builder_is_debug_build` appears to fail here, while referring to the option does not?
# Perhaps it's due to being within a function?
if builder_has_option --debug; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Crossreference lines 11-13; the same issue is noted there.

@jahorton jahorton marked this pull request as draft March 6, 2024 05:14
@jahorton
Copy link
Contributor Author

jahorton commented Mar 6, 2024

Currently falling over here:

[10:57:58 ](https://build.palaso.org/buildConfiguration/Keyman_iOS_TestSamplesAndTestProjects/448031?buildTab=log&linesState=978&logView=flowAware&focusLine=978)
  cp: cannot stat '/Users/mcdurdin/buildAgent/work/99b311828f4ee7c/keyman/ios/build/Build/Products/Debug/KeymanEngine.xcframework': No such file or directory

The CI build for the samples calls the main samples' build script directly. That script triggers the iOS engine build script via dependency... and that call doesn't include the --debug flag. As a result, the Debug/ folder artifacts don't exist - just the Release/ ones.

I'm not sure what the best way is to work around the issue at the moment - we can't pass --debug as an option on dependency builds, after all - so I've put this PR into draft mode for the time being.

@mcdurdin
Copy link
Member

mcdurdin commented Mar 6, 2024

I'm not sure what the best way is to work around the issue at the moment - we can't pass --debug as an option on dependency builds, after all - so I've put this PR into draft mode for the time being.

Debug flag is supposed to be handled for dependency builds, I thought. If not, we should fix that separately.

@mcdurdin
Copy link
Member

mcdurdin commented Mar 6, 2024

  # `builder_is_debug_build` appears to fail here, while referring to the option does not?
  # Perhaps it's due to being within a function?
  if builder_has_option --debug; then

Let's get this fixed in builder, will open an issue

The '--debug' flag should not be specified as a parameter in the
builder_describe call.
@mcdurdin
Copy link
Member

Pushed a commit which resolves the --debug issue.

@darcywong00 darcywong00 modified the milestones: B17S3, B17S4 Mar 16, 2024
@mcdurdin mcdurdin modified the milestones: B17S4, B17S5 Mar 30, 2024
@jahorton
Copy link
Contributor Author

jahorton commented Apr 12, 2024

The one thing I don't like about the fix is that it results in less-documented build scripts - I'd originally specified the --debug option in those places so that they could have better-specialized descriptions.

That said... I guess it's a bit late in the release cycle to tweak that, eh?

@jahorton jahorton marked this pull request as ready for review April 12, 2024 02:12
@jahorton jahorton requested a review from mcdurdin as a code owner April 12, 2024 02:12
@darcywong00 darcywong00 modified the milestones: B17S5, B17S6 Apr 12, 2024
@mcdurdin
Copy link
Member

The one thing I don't like about the fix is that it results in less-documented build scripts - I'd originally specified the --debug option in those places so that they could have better-specialized descriptions.

That said... I guess it's a bit late in the release cycle to tweak that, eh?

It's best if the build scripts don't need more information about --debug. We really want them to be consistent throughout.

The description "Activates developer-friendly debug mode for unit tests where applicable" shouldn't be necessary. "--debug" means developer-friendly debug mode, that's its entire purpose. And "for unit tests" should be self-evident. If it isn't, then we should look at updating our wikis (not that we have one for build.sh at present).

@jahorton
Copy link
Contributor Author

The one thing I don't like about the fix is that it results in less-documented build scripts - I'd originally specified the --debug option in those places so that they could have better-specialized descriptions.

That said... I guess it's a bit late in the release cycle to tweak that, eh?

It's best if the build scripts don't need more information about --debug. We really want them to be consistent throughout.

The description "Activates developer-friendly debug mode for unit tests where applicable" shouldn't be necessary. "--debug" means developer-friendly debug mode, that's its entire purpose. And "for unit tests" should be self-evident. If it isn't, then we should look at updating our wikis (not that we have one for build.sh at present).

Eh, given our success rate of thinking things in code are self-evident within the team, I'm not terribly optimistic about external developers finding all the implications of --debug self-evident per project.

@mcdurdin
Copy link
Member

I think you are missing the point. build.sh is intended to be consistent across projects. If it isn't, then we should try and make it so. This is especially the case for a common flag like --debug

@jahorton jahorton merged commit 026cef2 into beta Apr 17, 2024
19 checks passed
@jahorton jahorton deleted the fix/ios/sample-builds branch April 17, 2024 04:56
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.309-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants