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

feat(core): ldml repertoire test, initial ICU integration 🙀 #8441

Merged
merged 35 commits into from
Apr 24, 2023

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Mar 15, 2023

  • icu4c as a required, statically linked, dependency, only on the ldml test (for now

For: #8435 and #8495

Note, f2b8b9b does add build files from mesonbuild/wrapdb, includes license file (MIT)

@keymanapp-test-bot skip

@srl295 srl295 self-assigned this Mar 15, 2023
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Mar 15, 2023

User Test Results

Test specification and instructions

User tests are not required

- icu4c as an optional dependency

For: #8435
@srl295
Copy link
Member Author

srl295 commented Mar 15, 2023

Trying to see how this builds.

Had to run:

$ sudo ln -s /usr/local/opt/icu4c/lib/pkgconfig/* /opt/X11/lib/pkgconfig/

due to meson issues, see https://bugs.freedesktop.org/show_bug.cgi?id=111126#c8

may be able to do: meson… --build.pkg-config-path "$PKG_CONFIG_PATH"

which seems very redundant. c'mon meson…

Comment on lines 7 to 8
pkgconfig = 'pkg-config'
icu4c = dependency('icu-uc', required: false)
Copy link
Member

Choose a reason for hiding this comment

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

How will this work on Windows builds?

Copy link
Member Author

@srl295 srl295 Mar 16, 2023

Choose a reason for hiding this comment

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

Choco? I'll see. Making it optional as a PoC.

Should be able to use icu (minus data) in a static link scenario if needed.

Also eventually this will be a Dev tool not a unit test.

Copy link
Member

Choose a reason for hiding this comment

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

Is this intended just for tests?

I would be happy to include icu as a dependency but we need to think about how we want to add it strategically because adding dependencies is always complicated for a cross-platform project.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea for tests. I think it's ultimately a part of developer tools. Which will have wasm linked icu4c or icu4x available. So this is just a way to bring up and prove out.

- wip: right now passes, because it emits the repertoire text as it goes

For: #8435
- wip: simple lookup for an exact key

For: #8435
@srl295
Copy link
Member Author

srl295 commented Mar 16, 2023

  • 🤦 the mac cross compile stuff means…… the homebrew linkage doesn’t work because it’s the “wrong” architecture (arm vs x64)
  • WIP. It's able to get 1-1 keys (a, b, c etc.) but fails for Khmer with "No string for repertoire test: ា" since tiny….xml does not have a single key with ា
  • I originally excluded strings in UnicodeSet but wonder if I should rethink that. Instead of [ħ ថា] it would be [ħ {ថា}] i.e. expecting that there's a key (flick etc) that can generate "ថា" wholesale as a string
  • no transforms yet.

- wip: conditional for hasStrings

For: #8435
@srl295
Copy link
Member Author

srl295 commented Apr 13, 2023

So @srl295 are you okay with waiting on @ermshiperete's response next week before merging this, or is it blocking something else?

I'm ok.

… it might well be an ICU 73.1 integration then!

@srl295
Copy link
Member Author

srl295 commented Apr 14, 2023

18:46:21 1) KmpCompiler
18:46:21 should generates a valid .kmp (zip) file:
18:46:21 Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\BuildAgent\work\7ac43416c45637e9\keyman\developer\src\kmc-package\build\test\test-package-compiler.js)
18:46:21 at listOnTimeout (node:internal/timers:557:17)
18:46:21 at processTimers (node:internal/timers:500:7)

seems like something unrelated, rerunning

@mcdurdin mcdurdin modified the milestones: A17S10, A17S11 Apr 15, 2023
@mcdurdin
Copy link
Member

seems like something unrelated, rerunning

I saw this on one of our agents with another build, checking the agents now. We may have to adjust the test timeout for that specific test.

@ermshiperete
Copy link
Contributor

@ermshiperete we should be able to update meson on ba-bionic64ta right? It's only on packaging agents we can't do that.

Probably. I can't think of a reason why it should not work although I have the feeling I'm overlooking something. I guess we can try and find out if it works 😄

@srl295
Copy link
Member Author

srl295 commented Apr 18, 2023

@ermshiperete we should be able to update meson on ba-bionic64ta right? It's only on packaging agents we can't do that.

Probably. I can't think of a reason why it should not work although I have the feeling I'm overlooking something. I guess we can try and find out if it works 😄

so, where are we on this? PR as it is requires icu to be installed beforehand if you're on linux, otherwise builds its own. Ready to merge?

@ermshiperete
Copy link
Contributor

ermshiperete commented Apr 19, 2023

so, where are we on this? PR as it is requires icu to be installed beforehand if you're on linux, otherwise builds its own. Ready to merge?

Fine with me (once the agent got updated), as long as it is possible to build with ICU 66 on linux.

@ermshiperete
Copy link
Contributor

ba-bionic-64-ta updated to meson 1.1.0.

Comment on lines 9 to 13
- Ideally we would use meson's [wrapdb](https://mesonbuild.com/Wrapdb-projects.html), and in fact the files here are sourced from that project.
- However, it requires a much newer meson version to work properly: 0.55 at least.
- Patches for icu (i.e. meson build files) are in [`packagefiles/icu`](./packagefiles/icu/)
- The file `packagefiles/icu-minimal.zip` is generated from the files in [`packagefiles/icu`](./packagefiles/icu/)
- Regenerate it with these commands:
Copy link
Member

@mcdurdin mcdurdin Apr 20, 2023

Choose a reason for hiding this comment

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

So, given we can build with meson 1.0+ on our ba-bionic64ta agent now (which is where we are limited on meson version), we should be able to rely on system-supplied ICU (v66) for Ubuntu and thus simplify the integration here, am I right?

If so, let's go ahead and do that simplification of the ICU integration here and then this should be ready to merge!

Copy link
Member Author

Choose a reason for hiding this comment

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

We can drop the zip file (again!) that's the simplification we can do now. We can't use upstream wrap db AND minimize size yet. But I hope to upstream changes to make the icu configurable so we can someday depend on the wrap

Copy link
Member

Choose a reason for hiding this comment

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

That's a good step forward, really happy to not include the .zip!

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good step forward, really happy to not include the .zip!

You ok if I force push just to drop the last couple commits? That will remove the zip I re added.

Copy link
Member

Choose a reason for hiding this comment

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

ok

Copy link
Member Author

Choose a reason for hiding this comment

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

Nevermind. That's not going to work with the merges. Anyway, I did a revert and also another merge

- Revert "feat(core): icu integration steps 🙀"
- This reverts commit c168253.
core/subprojects/README.md Outdated Show resolved Hide resolved
- version is 73.1 not 72.1
- add mention in linux build docs
- add libicu-dev dependency in debian control (but not runtime)

for #8495
@srl295
Copy link
Member Author

srl295 commented Apr 24, 2023

I'm re-requesting review because I've updated the linux docs and the controlfile. Note that it adds icu to the debian requirements for build but not deploy yet, since it's not yet a requirement until in core.

core/subprojects/README.md Outdated Show resolved Hide resolved
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
@srl295 srl295 merged commit 24b4836 into master Apr 24, 2023
2 checks passed
@srl295 srl295 deleted the feat/core-8435-repertoire-test-epic-ldml branch April 24, 2023 15:34
@srl295
Copy link
Member Author

srl295 commented Apr 24, 2023

🎉

@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.93-alpha

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

Successfully merging this pull request may close these issues.

feat(core): integrate ICU4C into the build for ldml 🙀 feat(core): ldml support repertoire tests 🙀
4 participants