Skip to content

fix(developer): remove incorrect offset for compiler error line#14651

Merged
mcdurdin merged 2 commits intomasterfrom
fix/developer/13903-offset-compiler-error-line
Sep 2, 2025
Merged

fix(developer): remove incorrect offset for compiler error line#14651
mcdurdin merged 2 commits intomasterfrom
fix/developer/13903-offset-compiler-error-line

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Aug 30, 2025

Not sure how this one came back - but it's certainly wrong in 18.0. Considering back port to 18.0.

Fixes: #13903

User Testing

I would like to verify a random selection of keyboards that have hints or warning messages in the .kmn, to make sure that the line number reported is correct. The attached log file can be scanned (search for .kmn:) for hints and warnings with line numbers. Please choose a selection of these hints and warnings. The log file should be showing the errors off by one line. The new compiler should show the same messages for the keyboard, but this time reporting the correct line number.

Keyboards_Build_and_Deploy_2338.zip

For example, in the log file we can find:

...
sil_korda_latin.kmn - info KM05002: Building release/sil/sil_korda_latin/source/sil_korda_latin.kmn
sil_korda_latin.kmn:82 - hint KM020AE: This rule will never be matched as the rule on line 79 takes precedence
sil_korda_latin.kmn:83 - hint KM020AE: This rule will never be matched as the rule on line 80 takes precedence
sil_korda_latin.kmn:127 - hint KM020AE: This rule will never be matched as the rule on line 111 takes precedence
sil_korda_latin.kmn - info KM05006: release/sil/sil_korda_latin/source/sil_korda_latin.kmn built successfully.
...

But if we build with this version of kmc, we should see:

kmc build release/sil/sil_korda_latin
...
sil_korda_latin.kmn - info KM05002: Building release/sil/sil_korda_latin/source/sil_korda_latin.kmn
sil_korda_latin.kmn:81 - hint KM020AE: This rule will never be matched as the rule on line 79 takes precedence
sil_korda_latin.kmn:82 - hint KM020AE: This rule will never be matched as the rule on line 80 takes precedence
sil_korda_latin.kmn:126 - hint KM020AE: This rule will never be matched as the rule on line 111 takes precedence
sil_korda_latin.kmn - info KM05006: release/sil/sil_korda_latin/source/sil_korda_latin.kmn built successfully.
...
  • TEST_REVIEW_WARNING_LINES: Check that a random selection of .kmn hints and warnings report the correct line number, using kmc.
  • TEST_REVIEW_WARNING_LINES_IDE: Check that a random selection of .kmn hints and warnings report the correct line number, in the IDE, and that double-clicking on the error message highlights the correct line.

@github-project-automation github-project-automation bot moved this to Todo in Keyman Aug 30, 2025
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Aug 30, 2025
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Aug 30, 2025

User Test Results

Test specification and instructions

  • TEST_REVIEW_WARNING_LINES (PASSED): notes (notes)
  • TEST_REVIEW_WARNING_LINES_IDE (PASSED): notes (notes)

Test Artifacts

@darcywong00 darcywong00 self-assigned this Sep 1, 2025
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

Copy link
Copy Markdown
Contributor

@ermshiperete ermshiperete left a comment

Choose a reason for hiding this comment

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

LGTM

@Nnyny Nnyny self-assigned this Sep 2, 2025
@Nnyny
Copy link
Copy Markdown
Contributor

Nnyny commented Sep 2, 2025

Test Results

Before testing:
- Download keymandeveloper-19.0.108.exe and keyboards_build_and_deploy_2338.zip on Windows 11 VM
- Install Git and clone the keyboards from https://github.com/keymanapp/keyboards

  • TEST_REVIEW_WARNING_LINES (PASSED): notes
  1. Find error keyboard in 'keyboards_build_and_deploy_2338' note
  2. Choose aksarabali_panlex keyboard as reference
  3. Launch Keyman Developer version 19.0.108-alpha-test-14651
  4. Open release/a/aksarabali_panlex and compile the keyboard .kmn file
  5. Verify the error messages output correct lines (which is one number behind compare to the note)
  • TEST_REVIEW_WARNING_LINES_IDE (PASSED): notes
  1. Verify the errors report the right number lines
  2. Double click on an error message, verify the error line is highlighted

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Sep 2, 2025
@Nnyny
Copy link
Copy Markdown
Contributor

Nnyny commented Sep 2, 2025

While downloading Keyman Developer, I noticed the copyright year is outdated.

Screenshot 2025-09-02 103930

@mcdurdin mcdurdin merged commit 8150f36 into master Sep 2, 2025
8 checks passed
@mcdurdin mcdurdin deleted the fix/developer/13903-offset-compiler-error-line branch September 2, 2025 09:29
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Sep 2, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.111-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug(developer): Warning messages are one line off

5 participants