feat(developer): Add support for building a folder to kmc 🙀#8326
Merged
mcdurdin merged 1 commit intofeature-ldmlfrom Feb 27, 2023
Merged
feat(developer): Add support for building a folder to kmc 🙀#8326mcdurdin merged 1 commit intofeature-ldmlfrom
mcdurdin merged 1 commit intofeature-ldmlfrom
Conversation
Relates to #2761. kmc now supports passing in a folder and building all Keyman source files found in the folder, even if a .kpj is not present in the folder. If a .kpj file exists, `KeymanDeveloperProject/Options/Version` will be checked to determine behaviour. If this field is missing or "1.0", then the classical behaviour persists. If the Version field is "2.0", the `Files` key is ignored, and .kmn, .xml, .model.ts, and .kps files under `sourcePath` are enumerated and added to the in-memory project for build. If a .kpj is not present in the folder, a virtual project is constructed in memory with the following defaults: * `version`: `2.0` * `buildPath`: `$PROJECTPATH/build` * `sourcePath`: `$PROJECTPATH/source` * `compilerWarningsAsErrors`: `false` * `warnDeprecatedCode`: `true` * `checkFilenameConventions`: `true` It is still considered an error to include both a keyboard and a model in the same file, but a version 2.0 project will not include the field determining its type in `Options/ProjectType`; this will instead be checked during build. The call to `kmc` can reference a folder or a .kpj file. The .kpj file must have the same basename as the folder name (e.g. `khmer_angkor/khmer_angkor.kpj`). WARNING: this does not add support for 2.0 projects to Keyman Developer; it is likely that opening a version 2.0 project in Developer will currently corrupt it. WARNING: it is not anticipated that kmcomp.exe will be updated to support version 2.0 projects -- rather kmcomp.exe will be removed before release of v17, and replaced with kmc.
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Base automatically changed from
feat/developer/5283-kmc-kpj-support
to
feature-ldml
February 27, 2023 08:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #2761.
kmc now supports passing in a folder and building all Keyman source files found in the folder, even if a .kpj is not present in the folder.
If a .kpj file exists,
KeymanDeveloperProject/Options/Versionwill be checked to determine behaviour. If this field is missing or "1.0", then the classical behaviour persists.If the Version field is "2.0", the
Fileskey is ignored, and .kmn, .xml, .model.ts, and .kps files undersourcePathare enumerated and added to the in-memory project for build.If a .kpj is not present in the folder, a virtual project is constructed in memory with the following defaults:
version:2.0buildPath:$PROJECTPATH/buildsourcePath:$PROJECTPATH/sourcecompilerWarningsAsErrors:falsewarnDeprecatedCode:truecheckFilenameConventions:trueIt is still considered an error to include both a keyboard and a model in the same file, but a version 2.0 project will not include the field determining its type in
Options/ProjectType; this will instead be checked during build.The call to
kmccan reference a folder or a .kpj file. The .kpj file must have the same basename as the folder name (e.g.khmer_angkor/khmer_angkor.kpj).WARNING: this does not add support for 2.0 projects to Keyman Developer; it is likely that opening a version 2.0 project in Developer will currently corrupt it.
WARNING: it is not anticipated that kmcomp.exe will be updated to support version 2.0 projects -- rather kmcomp.exe will be removed before release of v17, and replaced with kmc.
@keymanapp-test-bot skip