chore: rename kmc-keyboard to kmc-ldml

Part of #8719.
This commit is contained in:
Marc Durdin 2023-05-09 14:03:16 +07:00
parent 3b1c484538
commit 4838ba1ffe
116 changed files with 45 additions and 43 deletions

View file

@ -36,13 +36,13 @@ export function compilerErrorSeverityName(code: number): string {
* Defines the error code ranges for various compilers. Once defined, these
* ranges must not be changed as external modules may depend on specific error
* codes. Individual errors are defined at a compiler level, for example,
* kmn-keyboard/src/compiler/messages.ts.
* kmc-ldml/src/compiler/messages.ts.
*/
export enum CompilerErrorNamespace {
/**
* kmc-keyboard errors between 0x00000x0FFF
* kmc-ldml errors between 0x00000x0FFF
*/
KeyboardCompiler = 0x0000,
LdmlKeyboardCompiler = 0x0000,
/**
* common/web/types errors between 0x10000x1FFF
*/

View file

@ -46,11 +46,11 @@ working on layr, using disp as a model from https://github.com/keyma
## In-memory data: Phase 2
- first the compiler tests
- add a section in `developer/src/kmc-keyboard/test/fixtures/sections` if needed
- add a test case such as `developer/src/kmc-keyboard/test/test-key2.ts`
- add a section in `developer/src/kmc-ldml/test/fixtures/sections` if needed
- add a test case such as `developer/src/kmc-ldml/test/test-key2.ts`
- add a compiler
- `developer/src/kmc-keyboard/compiler/key2.ts`
- link it in to `developer/src/kmc-keyboard/src/compiler/compiler.ts`
- `developer/src/kmc-ldml/compiler/key2.ts`
- link it in to `developer/src/kmc-ldml/src/compiler/compiler.ts`
- add the import
- add to `SECTION_COMPILERS`
@ -68,10 +68,10 @@ working on layr, using disp as a model from https://github.com/keyma
- Also note that restructure will happily ignore (write zeros for) any fields where the BUILDER_* fields don't match the COMP_PLUS_* fields.
- update basic.xml and basic.txt
- Tweak `eveloper/src/kmc-keyboard/test/fixtures/basic.xml` as needed
- You can use `developer/src/kmc-keyboard/build.sh build-fixtures` which will generate these. The two .kmx files are supposed to match: if not, fix `basic.txt` or fix other bugs.
- `developer/src/kmc-keyboard/build/test/fixtures/basic-txt.kmx` - KMX generated from basic.txt.
- `developer/src/kmc-keyboard/build/test/fixtures/basic-xml.kmx` - KMX generated from basic.xml.
- `developer/src/kmc-keyboard/build/test/fixtures/basic-xml.kvk` - KVK generated from basic.xml.
- Tweak `eveloper/src/kmc-ldml/test/fixtures/basic.xml` as needed
- You can use `developer/src/kmc-ldml/build.sh build-fixtures` which will generate these. The two .kmx files are supposed to match: if not, fix `basic.txt` or fix other bugs.
- `developer/src/kmc-ldml/build/test/fixtures/basic-txt.kmx` - KMX generated from basic.txt.
- `developer/src/kmc-ldml/build/test/fixtures/basic-xml.kmx` - KMX generated from basic.xml.
- `developer/src/kmc-ldml/build/test/fixtures/basic-xml.kvk` - KVK generated from basic.xml.
## more to come

View file

@ -28,8 +28,8 @@ builder_describe \
build \
test \
":kmcmplib=src/kmcmplib Compiler - .kmn compiler" \
":kmc-keyboard=src/kmc-keyboard Compiler - LDML Keyboard Module" \
":kmc-kmn=src/kmc-kmn Compiler - .kmn wrapper Keyboard Module" \
":kmc-ldml=src/kmc-ldml Compiler - LDML Keyboard Module" \
":kmc-model=src/kmc-model Compiler - Lexical Model Module" \
":kmc-model-info=src/kmc-model-info Compiler - .model_info Module" \
":kmc-package=src/kmc-package Compiler - Package Module" \

View file

@ -69,12 +69,12 @@ server: .virtual
cd $(DEVELOPER_ROOT)\src\server
$(MAKE) $(TARGET)
kmc: kmc-keyboard kmc-kmn kmc-model kmc-model-info kmc-package
kmc: kmc-ldml kmc-kmn kmc-model kmc-model-info kmc-package
cd $(DEVELOPER_ROOT)\src\kmc
$(MAKE) $(TARGET)
kmc-keyboard: .virtual
cd $(DEVELOPER_ROOT)\src\kmc-keyboard
kmc-ldml: .virtual
cd $(DEVELOPER_ROOT)\src\kmc-ldml
$(MAKE) $(TARGET)
kmc-kmn: .virtual

View file

@ -70,7 +70,7 @@ details.
node-based next generation compiler, hosts kmc, kmlmi, kmlmc, kmlmp
### src/kmc-keyboard - LDML Keyboard Compiler
### src/kmc-ldml - LDML Keyboard Compiler
Next Generation keyboard compiler package - LDML keyboards only at present.
Command line access through kmc.

View file

@ -3,9 +3,9 @@ import * as path from 'path';
import { CompilerEvent, CompilerCallbacks, CompilerSchema, CompilerPathCallbacks, CompilerFileSystemCallbacks } from '@keymanapp/common-types';
export { verifyCompilerMessagesObject } from './verifyCompilerMessagesObject.js';
// TODO: schemas are only used by kmc-keyboard for now, so this works at this
// TODO: schemas are only used by kmc-ldml for now, so this works at this
// time, but it's a little fragile if we need them elsewhere in the future
const SCHEMA_BASE = '../../../../kmc-keyboard/build/src/';
const SCHEMA_BASE = '../../../../kmc-ldml/build/src/';
/**
* A CompilerCallbacks implementation for testing

View file

@ -30,7 +30,7 @@ builder_describe "Build Keyman kmc Keyboard Compiler module" \
"--dry-run,-n don't actually publish, just dry run"
builder_describe_outputs \
configure /node_modules \
build /developer/src/kmc-keyboard/build/src/main.js
build /developer/src/kmc-ldml/build/src/main.js
builder_parse "$@"

View file

@ -1,6 +1,6 @@
{
"name": "@keymanapp/kmc-keyboard",
"description": "Keyman Developer keyboard compiler",
"name": "@keymanapp/kmc-ldml",
"description": "Keyman Developer LDML keyboard compiler",
"keywords": [
"keyboard",
"keyman",

View file

@ -1,10 +1,10 @@
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m } from "@keymanapp/common-types";
const SevInfo = CompilerErrorSeverity.Info | CompilerErrorNamespace.KeyboardCompiler;
const SevHint = CompilerErrorSeverity.Hint | CompilerErrorNamespace.KeyboardCompiler;
const SevInfo = CompilerErrorSeverity.Info | CompilerErrorNamespace.LdmlKeyboardCompiler;
const SevHint = CompilerErrorSeverity.Hint | CompilerErrorNamespace.LdmlKeyboardCompiler;
// const SevWarn = CompilerErrorSeverity.Warn | CompilerErrorNamespace.KeyboardCompiler;
const SevError = CompilerErrorSeverity.Error | CompilerErrorNamespace.KeyboardCompiler;
const SevFatal = CompilerErrorSeverity.Fatal | CompilerErrorNamespace.KeyboardCompiler;
const SevError = CompilerErrorSeverity.Error | CompilerErrorNamespace.LdmlKeyboardCompiler;
const SevFatal = CompilerErrorSeverity.Fatal | CompilerErrorNamespace.LdmlKeyboardCompiler;
export class CompilerMessages {
static Error_InvalidNormalization = (o:{form: string}) => m(this.ERROR_InvalidNormalization, `Invalid normalization form '${o.form}`);

Some files were not shown because too many files have changed in this diff Show more