Skip to content

feat(developer): Add support for building a folder to kmc 🙀#8326

Merged
mcdurdin merged 1 commit intofeature-ldmlfrom
feat/developer/2761-kmc-build-project-2.0
Feb 27, 2023
Merged

feat(developer): Add support for building a folder to kmc 🙀#8326
mcdurdin merged 1 commit intofeature-ldmlfrom
feat/developer/2761-kmc-build-project-2.0

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

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.

@keymanapp-test-bot skip

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.
@mcdurdin mcdurdin added this to the A17S7 milestone Feb 27, 2023
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Feb 27, 2023

@mcdurdin mcdurdin changed the title feat(developer): Add support for building a folder to kmc feat(developer): Add support for building a folder to kmc 🙀 Feb 27, 2023
Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

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

lgtm

Base automatically changed from feat/developer/5283-kmc-kpj-support to feature-ldml February 27, 2023 08:56
@mcdurdin mcdurdin merged commit 0b7b229 into feature-ldml Feb 27, 2023
@mcdurdin mcdurdin deleted the feat/developer/2761-kmc-build-project-2.0 branch February 27, 2023 08:56
@mcdurdin mcdurdin linked an issue Mar 2, 2023 that may be closed by this pull request
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.

feat(developer): Use Folders instead of Projects

2 participants