Skip to content

Conversation

@mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Dec 5, 2024

Brought to you by the Share Bear 🐻

See: #11236
Build-bot: build
Test-bot: skip

The concept here is that the 'Name' property for a file can now be a
remote reference, rather than a local file. There are two supported
formats in this commit:

* GitHub: This is a cutdown version of a plain github.com URL, and must
  match this exact format:

  ```
  github:<owner>/<repo>/raw/<hash>/<filepath/filename>
  ```

  This format is mandated in order to ensure that we always have a
  hashed version of a file from the origin. This gives us reproducible
  builds, which avoids churn issues when font files change.

  Example: `github:silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf`
  gets https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf

  An alternative could be to just have `https://github.com/silnrsi/fonts/raw/b88c7af5d16681bd137156929ff8baec82526560/fonts/sil/alkalami/Alkalami-Regular.ttf`
  which could be matched with a regex in the same way as the `github`
  prefix, and would avoid the need to munge the input URL. **Discuss!**

* fonts.languagetechnology.org: references just a font identifier. This
  is somewhat broken, because if the source file changes, we don't know
  about it and won't publish an updated version of the package. So this
  needs some more discussion (we could e.g. embed the version number in
  the request, e.g. `flo:andika@6.200`). **Discuss!**

  ```
  flo:<family>
  ```

  e.g. `flo:andika` gets
  https://fonts.languagetechnology.org/fonts/sil/andika/Andika-Bold.ttf

Future sources could be considered, e.g. noto. We don't want to allow
arbitrary URLs, both for stability and for security reasons.

This change is entirely compiler-side, so we don't need to make any
changes to apps, and so packages will be backwardly compatible. A lot of
work will need to be done with the Package Editor in TIKE to support
this feature.

Fixes: #11236
…at/developer/kmc-package-source-files-from-remotes-2
…es-from-remotes-2'

of https://github.com/keymanapp/keyman into feat/developer/kmc-package-source-files-from-remotes-2
After the reorganization of the package compiler build, we now need to
make sure all files referenced in the .kps exist in order for the unit
tests to pass.
…matches

As our data files often come from Windows, we need to test if paths are
Windows-style absolute paths, with either path separator (e.g. `C:\...`,
`\path\...`, `\\server\path\...`, `/path/...`). Technically, this means
a posix path that starts with an escaped character would be regarded as
absolute, but IMHO those kinds of shenanigans deserve to result in a
failing build anyway. ;-)
Adds error for unsupported versions, hint for low versions when using
remote references.
…es-from-remotes-2' into change/developer/12746-kmc-copy-full-gh-url
… into change/developer/12746-kmc-copy-full-gh-url
…ource-files-from-remotes-2

feat(developer): kmc-package support remote fonts and files 🐻
…opy-full-gh-url

change(developer): use full github url in kmc copy parameters
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Dec 5, 2024

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

  • Developer
    • Keyman Developer - build : all tests passed (no artifacts on BuildLevel "build")
    • Compiler Regression Tests - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman Developer (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip - build : all tests passed (no artifacts on BuildLevel "build")
    • kmcomp.zip (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
  • Keyboards
    • Test Keyboards - build : all tests passed (no artifacts on BuildLevel "build")
  • Windows
    • Keyman for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows - build : all tests passed (no artifacts on BuildLevel "build")
    • FirstVoices Keyboards for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Keyman for Windows (old PRs) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (32 bit) - build : all tests passed (no artifacts on BuildLevel "build")
    • Text Editor (64 bit) - build : all tests passed (no artifacts on BuildLevel "build")

@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S16 milestone Dec 5, 2024
@darcywong00 darcywong00 modified the milestones: A18S16, A18S17 Dec 7, 2024
@darcywong00 darcywong00 modified the milestones: A18S17, A18S18 Dec 21, 2024
@darcywong00 darcywong00 modified the milestones: A19S14, A19S15 Oct 24, 2025
Test-bot: skip
Build-bot: skip release:developer,windows
chore(windows): VS2022 patch for epic/shared-fonts 🐻
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants