Commit graph

1030 commits

Author SHA1 Message Date
Eberhard Beilharz
a98ee7040b
Merge pull request #12235 from keymanapp/fix/core/emcc_detect
fix(core): look for `emcc` instead of `emcc.py`
2024-08-20 22:41:46 +02:00
Eberhard Beilharz
ab3722ecfa
fix(core): look for emcc instead of emcc.py on Linux and Mac
`emcc.py` is not marked as executable in emcripten's git repo so the
build failed when trying to locate emscripten. However, it turns out
that `emcc` is marked as executable, so we use that instead.

On Windows however, we still need to use `emcc.py` because otherwise
Meson won't detect it as valid compiler.
2024-08-20 15:52:52 +02:00
Steven R. Loomis
7c0f51c486 fix(core): set mac build version for meson cli build to 10.13
- add as option to compiler
- Match version in #11302

Fixes: #11423
2024-08-19 10:22:10 -05:00
Marc Durdin
bad54e4fed
Merge pull request #12171 from keymanapp/refactor/core/make-utfcodec-common
refactor(core): move utfcodec to common
2024-08-14 19:10:16 +10:00
Marc Durdin
613bdb6c19 refactor(core): move utfcodec to common
Refactor to support codecvt cleanup work in kmcmplib.
2024-08-13 15:04:07 +02:00
Marc Durdin
859c88a6de docs: add .kmx specification
Fixes: #11407
2024-08-12 17:04:24 +07:00
Marc Durdin
05edc8a7ce
Merge branch 'master' into refactor/windows/cleanup-engine-logging 2024-07-23 17:29:55 +10:00
Eberhard Beilharz
88f6c95803
fix(core): allow to successfully build on Ubuntu 24.04
Without this change trying to build on Ubuntu 24.04 fails with
"error: 'intptr_t' has not been declared in '::'". I'm not sure
why that is happening, but this is an easy fix.
2024-07-04 13:07:10 +02:00
Marc Durdin
1be73a9c2e refactor(windows): clean up logging
* Remove unused parameters from SendDebugMessage functions
* Add SendDebugEntry and SendDebugExit functions for tracking
  function entry/exit
* Add indenting and function names to log entries
* Remove unused debug functions
* Eliminate now-unused hwnd parameter in initialization functions
* Replace Log,LogEntry,LogExit functions with SendDebug equivalents in
  kmtip

Many functions now have SendDebugEntry/SendDebugExit (or
return_SendDebugExit) pairs. It is important to SendDebugExit on all
returns from a function to keep the log indent depth consistent. In some
cases I chose not to add these logging calls, e.g. on frequently called
functions such as the message hooks.
2024-07-03 21:28:37 +10:00
Steven R. Loomis
a16608e229
Merge branch 'master' into test/core/10968-minimum-ldml-test 2024-06-17 08:24:11 -05:00
Steven R. Loomis
38c6fe1ba3
Merge pull request #11778 from keymanapp/feat/core/9467-remove-icu-for-wasm-epic-ldml
feat(core): remove ICU from core under wasm 🙀
2024-06-17 08:22:38 -05:00
Steven R. Loomis
e580043538
Merge pull request #11777 from keymanapp/feat/core/9467-devolve-regex-to-js2-epic-ldml
feat(core): devolve regex to javascript 🙀
2024-06-17 08:22:22 -05:00
Marc Durdin
d6992097fd
Merge pull request #11795 from keymanapp/fix/core/11794-serialize-core-tests-temporary-mitigation
fix(core): serialize tests for core/wasm on mac agents
2024-06-17 16:26:27 +10:00
Marc Durdin
db53ac1343 fix(core): serialize tests for core/wasm on mac agents
Mitigates: #11794
2024-06-16 16:42:38 +10:00
Steven R. Loomis
ed80095ab9
Merge branch 'master' into test/core/10968-minimum-ldml-test 2024-06-14 09:33:29 -05:00
Steven R. Loomis
2300571ad8 test(core): fix a type conversion issue in the minimal test
- need a null string for either narrow or wide chars

Fixes: #10968
2024-06-14 09:05:50 -05:00
Steven R. Loomis
ca34550a8d feat(core): update util_regex per review comments
- remove some TODOs that were obsolete
- copy/clarify/expand comments between the ICU and non-ICU sides

Fixes: #9467
2024-06-14 08:55:15 -05:00
Steven R. Loomis
3c82343218 test(core): Add a minimal test that exercises the core API
- this test doesn't actually run well, it compiles but fails with an assertion.
- the purpose is to exercise the linker.

Fixes: #10968
2024-06-13 16:56:36 -05:00
Steven R. Loomis
b2e3215b0b
Merge branch 'feat/core/9467-devolve-regex-to-js2-epic-ldml' into feat/core/9467-remove-icu-for-wasm-epic-ldml 2024-06-13 14:29:18 -05:00
Steven R. Loomis
ff3c9736f4
Merge branch 'master' into feat/core/9467-devolve-regex-to-js2-epic-ldml 2024-06-13 14:29:01 -05:00
Steven R. Loomis
edd42d1dcb
Merge pull request #11541 from keymanapp/feat/core/9467-devolve-norm-to-js3-epic-ldml
feat(core): devolve normalization to js 🙀
2024-06-13 14:28:45 -05:00
Steven R. Loomis
a744afc34f feat(core): remove ICU from core under wasm
Fixes: #9467
2024-06-13 14:20:58 -05:00
Steven R. Loomis
1a61a589b3 feat(core): devolve regex to js for wasm
- assert was wrong!

Fixes: #9467
2024-06-13 13:07:29 -05:00
Steven R. Loomis
263d0e32f2 chore(core): update comments and remove a raw numeric literal
- per review comments

Fixes: #9467

Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2024-06-13 12:17:55 -05:00
Marc Durdin
577986bb50
Merge pull request #11523 from keymanapp/chore/common/8399-cleanup-meson-warnings
chore(common): cleanup meson deprecations and warnings
2024-06-08 10:46:41 +10:00
Steven R. Loomis
acd3cc5847 feat(core): devolve regex to JS
- use JS regex code
- almost there - some perhaps escaping differences

Fixes: #9467
2024-06-07 18:11:20 -05:00
Steven R. Loomis
c4b01f7715 test(core): detailed unit test for util_regex
Fixes: #9467
2024-06-07 16:27:45 -05:00
Steven R. Loomis
55a025c767 refactor(core): devolve regex to js for wasm
- new module, core/src/util_regex.hpp
- no wasm implementationyet

Fixes: #9467
2024-06-05 16:53:43 -05:00
Steven R. Loomis
f156a7264d feat(core): generator in core/src for util_normalize_table.h
- temporary header file generated by wasm during build
- built using icu
- test_unicode verifies the contents and synchronization with running ICU.
- this is used by util_normalize to provide normalization properties under wasm without needing to include ICU.

Fixes: #9467
2024-06-05 15:47:20 -05:00
Steven R. Loomis
fdb2e95d20 feat(core): build improvements for --update-unicode option
Fixes: #9467
2024-06-04 12:26:00 -05:00
Steven R. Loomis
e9673867fa feat(core): speedup NFD boundary table
- use RLE encoding, thanks @mcdurdin
- much smaller table and faster lookup

Fixes: #9467
2024-06-04 12:23:16 -05:00
Steven R. Loomis
7fbeea85cc Merge remote-tracking branch 'upstream/master' into feat/core/9467-devolve-norm-to-js3-epic-ldml 2024-06-04 11:15:31 -05:00
Steven R. Loomis
53a6638a70 feat(core): generate and use static table in wasm for NFD boundary
- add core/tools build tree with custom targets
- add to core/build.sh to generate nfd_table.h
- test_unicode to validate Unicode version and compare NFD to actual ICU
- currently, linear search of the table.
2024-06-04 11:15:17 -05:00
Steven R. Loomis
31dedb7ca3 test(core): comments in get_block_unicode_ver() 2024-05-31 16:14:05 -05:00
Steven R. Loomis
403d342e10 test(core): clarify output of test_unicode
- group output by functional area

#10183
2024-05-27 16:42:11 -05:00
Marc Durdin
bd01d4b72a
Merge branch 'master' into chore/common/8399-cleanup-meson-warnings 2024-05-27 20:26:54 +07:00
Steven R. Loomis
5d420248eb feat(core): move more normalization logic into JS
- major redo of actions_normalize - into UTF-32 and not using ICU directly
- add some utilities: u32len, u32dup, context_items_from_utf32

#9467
2024-05-24 18:20:30 -05:00
Marc Durdin
6abf577f21
Merge branch 'feat/core/9467-devolve-regex-to-js-epic-ldml' into feat/core/9467-devolve-norm-to-js2-epic-ldml 2024-05-25 05:41:01 +07:00
Marc Durdin
d37b64be5e
Merge branch 'chore/common/10183-unicode-version' into feat/core/9467-devolve-regex-to-js-epic-ldml 2024-05-25 05:40:42 +07:00
Steven R. Loomis
a80a0a7dcb feat(core): move more normalization logic into JS
- add a normalize_nfd() which takes a single codepoint
- temporarily keep ICU in actions_normalize.cpp and ldml_transforms.cpp
- expand wasm opts in unit tests
2024-05-24 10:42:57 -05:00
Steven R. Loomis
465c4bfdc0 feat(core): add a KMN_NO_ICU internal switch to start being able to turn off ICU
- always set to 0 for now (keep ICU around)
- set KMN_IN_LDML_TESTS in tests to keep ICU there for test and comparison
- add core_icu.cpp and put some utils there.

#9467
2024-05-24 09:24:53 -05:00
Steven R. Loomis
e48f6c39e1 test(core): update per review comments
Fixes: #10183

Co-authored-by: Marc Durdin <marc@durdin.net>
2024-05-23 22:19:36 -05:00
Marc Durdin
900f248558 chore(common): cleanup meson deprecations and warnings
Most warnings have been cleaned up:

* min meson version is now 1.0
* additional parameters such as check, recursive added
* uses now global_source_root() instead of source_root()
* catting files on Windows wasn't actually working -- used in unit
  tests. This is because meson passes paths with forward slashes to
  cmd.exe `type` command, which doesn't understand them. This is bad,
  because we were running effectively null tests for the affected tests.
  Fortunately, the same tests were configured correctly on macOS and
  Linux, and were all passing, so no serious damage.

There is one significant warning left:

`WARNING: Project targets '>=1.0' but uses feature deprecated since
'0.64.0': copy arg in configure_file. Use fs.copyfile instead`

Refer to mesonbuild/meson#12792. I have opened a PR against that to
undeprecate `copy` kwarg in a future version of meson.

Fixes: #8399
2024-05-24 08:46:52 +07:00
Steven R. Loomis
43cd828e9d feat(core): change normalize_nfd() to use JS native call instead of ICU
- does not hit all ICU usage yet

#9467
2024-05-23 17:09:00 -05:00
Steven R. Loomis
d8b5c25954 chore(core): refactor to move most normalization calls into util_normalize.cpp
- fold ldml_utils.hpp into core_icu.h
- refactor to use km::core::util::normalize_nfd() functions where simple to do so

For #9467
2024-05-23 14:47:38 -05:00
Steven R. Loomis
f3a80f50a6 test(core): build fix for test_unicode
- incorporate change from #11483

Fixes: #10183
2024-05-23 11:26:16 -05:00
Steven R. Loomis
e5ee26aaea fix(core): add a test to verify ICU and Unicode version
- load version data from node.js, Blocks.txt, and ICU4C
- support wasm: copy package.json, nodeversions.json and Blocks.txt into the keyboard area so that they can be mounted under wasm

also:
- rename 'fallback' macro to KMN_FALLBACK to not conflict with hedley in utfcodec.hpp
- fix ambiguous path type in tests

Fixes: #10183
2024-05-23 09:31:15 -05:00
Marc Durdin
1e66b6ed0e
Merge pull request #11421 from keymanapp/chore/developer/11317-build.sh
chore(developer): build.sh for developer
2024-05-23 14:22:54 +07:00
Marc Durdin
9465c3e0b4 refactor(common): move enabled declaration into test_color.cpp
Moves variable declaration for `bool enabled` from .h to .cpp and fixes
up builds. Fixes `#include` in ldml_test_source.cpp which was inside a
namespace.

Fixes: #10426
2024-05-20 15:42:41 +07:00
Marc Durdin
ee0fc0ce14 chore(developer): cleanup npm publish
Use a new flag `--npm-publish` in conjunction with `publish` action,
so that the default will always be to `npm pack` if the new flag is not
specified. This flag is also guarded in the actual npm publish code to
ensure that it can only run in the appropriate CI alpha/beta/stable
environment, and not in local or test.

This then also removes the separate `pack` action.

Also removes legacy boilerplate from a number of build scripts.
2024-05-20 06:34:57 +07:00