keyboards icon indicating copy to clipboard operation
keyboards copied to clipboard

[meta] Move compiler out of repo and instead pull latest stable at build time

Open mcdurdin opened this issue 6 years ago • 2 comments

Currently, the compiler is included in the repository. This can cause challenges in maintaining the latest stable version in the many forks of the repo. So I propose that we move the compiler out of the repository and instead pull the latest stable version in either of the following situations:

  • tools/kmcomp.exe is not present (or related files)
  • if build.sh --install or build.sh --update is called (we should fixup params to be --xxx rather than -xxx as well, leaving old params with single hyphen for compat).

Compiler updates

The latest available compiler version should be checked from the downloads site using the API: https://downloads.keyman.com/api/version/developer/2.0?tier=stable (note, it would be better if this API included canonical URLs so we can avoid constructing our own each time...).

We can compare with the current kmcomp version with:

KMCOMP_VERSION=`kmcomp | LC_ALL=iso-8859-1 grep "Version" | cut -d" " -f 2 - | cut -d"," -f 1 -`

The compiler should be downloaded from the downloads site using stable URL https://keyman.com/go/download/kmcomp.

JSON schema version updates

Then, we should also source the latest JSON schema versions from api.keyman.com; this requires a new API for schema versioning; propose that we use https://api.keyman.com/schemas/keyboard_info.source/stable which redirects to the latest stable JSON schema, e.g. https://api.keyman.com/schemas/keyboard_info.source/1.0.4/keyboard_info.source.json.

This is simple to implement because we can do it entirely within web.config for now, which should be sufficient because we only have infrequent updates to schemas.

Other tools

jq-win64 and rsync should not be included in this infrastructure change. They can remain the repo.

See also the lexical-models issue at https://github.com/keymanapp/lexical-models/issues/19

mcdurdin avatar Apr 18 '19 04:04 mcdurdin

@mcdurdin has this been done in another PR?

LornaSIL avatar Jul 02 '21 15:07 LornaSIL

No, this is still outstanding.

mcdurdin avatar Jul 04 '21 22:07 mcdurdin