Commit graph

328 commits

Author SHA1 Message Date
Marc Durdin
a2acce8a73
Merge pull request #10941 from keymanapp/fix/developer/message-export-case-sensitivity
fix(developer): message export filename was title case
2024-03-05 20:33:20 +07:00
Marc Durdin
8993ac55c3 fix(developer): message export filename was title case
Triggered failure seen in https://github.com/keymanapp/help.keyman.com/pull/1085.
2024-03-05 03:22:27 -06:00
Marc Durdin
310504adb7
Merge pull request #10918 from keymanapp/chore/developer/consolidate-help-links
chore(developer): consolidate external links in Developer messages
2024-03-05 16:07:01 +07:00
Marc Durdin
e64103a02f chore(developer): consolidate external links in Developer messages
Establishes keyman-urls.ts as a single place for any links to external
websites.

I searched all .ts files in Keyman Developer source and replaced
references to websites with function calls here. Note that the names of
individual functions within this class can be easily changed as needed,
as the hard part was the consolidation.
2024-03-04 12:38:07 +07:00
Marc Durdin
dd6b942182
Merge pull request #10906 from keymanapp/chore/developer/10889-deploy-compiler-messages-to-help-site
chore(developer): deploy compiler messages to help site
2024-03-04 12:10:18 +07:00
Marc Durdin
d1aef64460 chore(developer): deploy compiler messages to help site
Fixes #10889.

This involved a bit more refactoring to help-keyman-com.sh in order to
allow for multiple paths to be uploaded.

I opted _not_ to move the entire Keyman Developer documentation into
this repository, partly because a number of pages are still in PHP
rather than Markdown.
2024-03-01 11:01:47 +07:00
Marc Durdin
ccb29e63d3
Merge pull request #10825 from keymanapp/test/developer/kmc-unit-test-infrastructure-messages
test(developer): kmc unit test infrastructure messages
2024-03-01 10:16:20 +07:00
Marc Durdin
44ab67575f
Merge branch 'beta' into feat/developer/10207-kmc-message-command 2024-03-01 08:29:12 +07:00
Marc Durdin
abd5a86196
Merge branch 'beta' into refactor/developer/10207-message-detail 2024-03-01 07:54:31 +07:00
Dr Mark C. Sinclair
c6ae4b183d chore(developer): change empty strings for nulls in unneeded outfile parameter for consistency 2024-02-29 09:39:36 +00:00
Marc Durdin
5062bbad98 feat(developer): adds kmc message command
Realtes to #10207.

Adds a new `kmc message` command which prints detailed information about
any or all compiler messages, in JSON, text, or markdown formats.

Markdown format is emitted to file in a structured way to be deployed to
the help site automatically (coming in a subsequent commit).
2024-02-29 11:05:27 +07:00
Marc Durdin
4bb9b39ba2 refactor(developer): reorganize messages for adding details
Moved the ERROR_Message line above the Error_Message line for every
message in the compiler message files, as it makes the grouping clearer
once we start adding message details. For example, see the start of the
KmnCompilerMessages class.

Also wraps potentially-undefined parameters to the messages with a new
function `def`, shorthand for `CompilerMessageDef`, which converts the
parameter to '<param>' if it is undefined, which is helpful for
documentation.
2024-02-28 16:00:02 +07:00
Marc Durdin
c7afed7201 refactor(developer): split messages with callstacks into separate generator
Relates to #10207.

In order to include message detail in messages, it is helpful to split
out the exception messages which have a separate parameter, so that
parameter at the same position can be the message detail.

Introduces the CompilerMessageSpecWithException function which takes an
exceptionVar parameter to achieve this differentiation.
2024-02-28 11:34:49 +07:00
Marc Durdin
e1a8ce47e3
Merge pull request #10821 from keymanapp/fix/developer/10396-repeated-options-in-kmc
fix(developer): repeated options in kmc must now be fully specified
2024-02-27 16:04:50 +07:00
Marc Durdin
e2908262f5
Merge pull request #10842 from keymanapp/docs/developer/10207-package-READMEs
docs(developer): npm package readme files 📚
2024-02-27 11:34:56 +07:00
Marc Durdin
c3ae2b5050
Merge pull request #10839 from keymanapp/feat/developer/typescript-api-docs
feat(developer): add api-extractor and api-documenter, config, and build integration 📚
2024-02-27 11:34:42 +07:00
Marc Durdin
212922dab6
chore: Update developer/src/kmc/README.md 2024-02-27 15:33:38 +11:00
Marc Durdin
4319d30ca3
chore: Update developer/src/kmc/README.md
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2024-02-27 15:28:19 +11:00
Steven R. Loomis
845a6fe501 fix(developer): exit kmc test data generation if any failure messages
- check for failing messages in the callback, not just failing compiles (no output)

Fixes: #10752

Co-authored-by: Marc Durdin <marc@durdin.net>
2024-02-26 14:32:19 -06:00
Dr Mark C. Sinclair
5e64ddbf57 chore(developer): suppress code coverage check on Error_OutFileCanOnlyBeSpecifiedWithSingleInfile 2024-02-26 12:07:40 +00:00
Dr Mark C. Sinclair
5eb6eb54e1 chore(developer): focus HINT_ProjectIsVersion10 test on just that message 2024-02-26 12:02:32 +00:00
Marc Durdin
602b519057 docs(developer): npm package readme files 2024-02-26 14:00:51 +07:00
Marc Durdin
a8d0d8454c feat(developer): add api documentation to build
Relates to #10207.

Adds the `api` action to build.sh for each affected module. The `api`
action for each module will generate the api metadata files, and then
the markdown files are generated by /developer/build.sh api.

Note that developer-utils, kmc, and kmcmplib have no api documentation
at this time (and kmcmplib is not Typescript so would need separate
tooling anyway).
2024-02-26 11:45:36 +07:00
Dr Mark C. Sinclair
9e9c6031db chore(developer): add HINT_ProjectIsVersion10 unit test 2024-02-23 16:04:56 +00:00
Dr Mark C. Sinclair
b60fa29964 chore(developer): remove duplicate ERROR_InvalidProjectFolder (invalid source folder) test 2024-02-23 12:11:06 +00:00
Marc Durdin
7b198eb4a4 fix(developer): repeated options in kmc must now be fully specified
Fixes #10396.

Instead of `--message 20ae 5006`, which is ambiguous, because 5006 could
be a filename, you must now specify the parameter option flag each time:
`--message 20ae --message 5006` (or `-m 20ae -m 5006`).
2024-02-23 13:17:11 +07:00
Marc Durdin
457275e46f fix(developer): ensure fatal errors report message or made non-fatal
Fixes #10678.

Some messages have been reduced to ERROR instead of FATAL, as they are
not internal compiler errors.

Where fatal messages are raised, the message will now be reported
through correctly to Sentry.
2024-02-20 11:10:39 +07:00
Marc Durdin
d0d1e5e6fe fix(developer): return an error code if build-test-data fails
Fixes #10752.

Also removes `console.log()` call and replaces with appropriate call to
`callbacks.reportMessage()`.
2024-02-19 14:06:03 +07:00
Dr Mark C. Sinclair
d670e47186 chore(developer): corrected assert message in both ERROR_InvalidProjectFolder tests 2024-02-17 15:58:37 +07:00
Dr Mark C. Sinclair
dc5a6aabb4 chore(developer): added missing underscore in filename in ERROR_CannotCreateFolder test 2024-02-17 15:58:36 +07:00
Dr Mark C. Sinclair
eff01fb3a1 chore(developer): corrected filename in ERROR_UnknownFileFormat unit test 2024-02-17 15:58:34 +07:00
Dr Mark C. Sinclair
429cad0703 chore(developer): change unnecessary template literals to single quotes in tests 2024-02-17 15:58:33 +07:00
Dr Mark C. Sinclair
62589599a0 chore(developer): rename fixture file in 'ERROR_FileTypeNotFound (BuildModelInfo; .model.ts)' 2024-02-17 15:58:32 +07:00
Dr Mark C. Sinclair
f4b1c968cc chore(developer): changes to files that should have been added to previous commits 2024-02-17 15:58:31 +07:00
Dr Mark C. Sinclair
1e292c34dc chore(developer): rename fixture file in 'ERROR_FileTypeNotFound (BuildModelInfo; .kps)' test 2024-02-17 15:58:29 +07:00
Dr Mark C. Sinclair
1a53c9d074 chore(developer): rename fixture file in 'ERROR_FileTypeNotFound (BuildKeyboardInfo)' test 2024-02-17 15:58:28 +07:00
Dr Mark C. Sinclair
f1fbb5a86a chore(developer): change folder name in ERROR_InvalidProjectFolder (no source folder) test' 2024-02-17 15:58:27 +07:00
Dr Mark C. Sinclair
ec8d2339a6 chore(developer): add ERROR_CannotCreateFolder infrastructure message unit test 2024-02-17 15:58:26 +07:00
Dr Mark C. Sinclair
1023c7c902 chore(developer): add ERROR_InvalidProjectFolder (no source folder) unit test 2024-02-17 15:58:20 +07:00
Dr Mark C. Sinclair
eb68475d35 chore(developer): correct error message in ERROR_UnknownFileFormat test 2024-02-17 15:56:33 +07:00
Dr Mark C. Sinclair
9fa6d23a54 chore(developer): change to reflect addition of outfile parameter to build methods 2024-02-17 15:56:32 +07:00
Dr Mark C. Sinclair
91524edfa9 chore(developer): add additional file type asserts to ERROR_FileTypeNotFound BuildModelInfo tests 2024-02-17 15:56:30 +07:00
Dr Mark C. Sinclair
5ef356a194 chore(developer): correct .kpj fixtures for ERROR_FileTypeNotFound BuildModelInfo tests 2024-02-17 15:56:29 +07:00
Dr Mark C. Sinclair
ca3362469f chore(developer): add ERROR_FileTypeNotFound (BuildModelInfo; .kps) unit test 2024-02-17 15:56:28 +07:00
Dr Mark C. Sinclair
8af4b93120 chore(developer): add ERROR_FileTypeNotFound (BuildModelInfo; .model.ts) unit test 2024-02-17 15:56:26 +07:00
Dr Mark C. Sinclair
f39ba347b2 chore(developer): add ERROR_FileTypeNotFound (BuildKeyboardInfo) unit test 2024-02-17 15:56:25 +07:00
Dr Mark C. Sinclair
e4821c872b chore(developer): add ERROR_UnknownFileFormat unit test and supporting endpoint 2024-02-17 15:55:59 +07:00
Dr Mark C. Sinclair
85d95ffa4f chore(developer): refactor to rename fixture/invalid-project to invalid-projects 2024-02-17 15:55:30 +07:00
Dr Mark C. Sinclair
015b81014c chore(developer): add ERROR_NotAProjectFile unit test 2024-02-17 15:54:03 +07:00
Dr Mark C. Sinclair
24e7105a9b chore(developer): add ERROR_InvalidProjectFile unit test 2024-02-17 15:52:27 +07:00