New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime(java): Stop handpicking syntax groups for @javaTop #14727
Conversation
So, a syntax test for |
Well, tests seem to pass now that |
I have locally run cd runtime/syntax/
script --log-out /tmp/make.script --log-timing /tmp/make.timing --command 'make clean test'
scriptreplay --divisor 0.05 --log-out /tmp/make.script --log-timing /tmp/make.timing (I wonder if it would be beneficial to instrument In either case, multi-byte characters are replaced on screen It would be helpful if someone with access to Mac (12, 14) |
@@ -341,8 +321,6 @@ if exists("java_highlight_debug") | |||
syn region javaDebugStrTemplEmbExp contained matchgroup=javaDebugStrTempl start="\\{" end="}" contains=javaComment,javaLineComment,javaDebug\%(Paren\)\@!.* | |||
syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@<="+ end=+"+ contains=javaDebugStrTemplEmbExp,javaDebugSpecial | |||
syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugStrTemplEmbExp,javaDebugSpecial,javaDebugTextBlockError | |||
" The next line is commented out, it can cause a crash for a long line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still true? I'm curious about the bug rather than the error highlighting feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was never a test suite for it so I wouldn't know.
Apparently, javaStringError
became a burden sometime around
October 2000, and javaDebugStringError
was just recently
still its copy squirreled away.
Anyway, sooner or later any fledgeling Javaist would learn
that:
It is a compile-time error for a line terminator (§3.4) to
appear after the opening " and before the matching closing
".
and that no line splicing is supported for either "a"
or
'a'
:
The line continuation escape sequence can appear in a text
block, but cannot appear in a character literal or a string
literal because each disallows a LineTerminator.
Let's toss it out.
Yeah, that is currently hard to do. I wondered if we can just simply cat all files from the Somthing like we do for ASAN here: Lines 299 to 305 in b8ecedc
Something like this perhaps?
|
The failed test is not a regression. I have found at least What is puzzling is that there are enough of successful test Maybe the fact that Line 2951 in d5c8c09
can be a clue. (It is matchable with Should I replace such problematic characters in tests? Should I drop the setting of |
Yes, I would say keep it as simple as possible in the test, so |
Also: - Remove the obsolete comment for g:java_allow_cpp_keywords. - Remove the commented out groups java\%[Debug\]StringError. - Infer and set the preferred formatting Vim options from the modeline. Since vim-6-0u, non-contained syntax groups can be referred to by using the "contains=TOP..." argument.
3127d56
to
30acb2e
Compare
With Let's see if these were the problem. (By the way, testing on the linux console ( |
alright, thanks! |
runtime(java): Stop handpicking syntax groups for @javaTop (vim/vim#14727) * runtime(java): Stop handpicking syntax groups for @javaTop Also: - Remove the obsolete comment for g:java_allow_cpp_keywords. - Remove the commented out groups java\%[Debug\]StringError. - Infer and set the preferred formatting Vim options from the modeline. Since vim-6-0u, non-contained syntax groups can be referred to by using the "contains=TOP..." argument. * Set &encoding and &termencoding to "utf-8" for test files * Limit non-ASCII charset to [§ƒɐɘʬʭΑ-Τα-μ] for test files vim/vim@06bdac1 Co-authored-by: Aliaksei Budavei <[email protected]>
runtime(java): Stop handpicking syntax groups for @javaTop (vim/vim#14727) * runtime(java): Stop handpicking syntax groups for @javaTop Also: - Remove the obsolete comment for g:java_allow_cpp_keywords. - Remove the commented out groups java\%[Debug\]StringError. - Infer and set the preferred formatting Vim options from the modeline. Since vim-6-0u, non-contained syntax groups can be referred to by using the "contains=TOP..." argument. * Set &encoding and &termencoding to "utf-8" for test files * Limit non-ASCII charset to [§ƒɐɘʬʭΑ-Τα-μ] for test files vim/vim@06bdac1 Co-authored-by: Aliaksei Budavei <[email protected]>
It is still a problem, now with And there are two other candidates: Since it fails only so often, can it be time related ( Another fun fact: when Vim is started with |
@chrisbra, there appears to be a way to fetch
Just following GitHub examples, we can give it a try with jobs:
. . . . . . .
macos:
steps:
. . . . . . .
- name: Test
timeout-minutes: 20
run: |
make ${TEST}
- name: Upload failed syntax tests
- uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
# Optional. Default is 'artifact'
# (Note that due to how artifacts are created in this v4
# version, it is no longer possible to upload to the same
# named artifact multiple times. You must either split the
# uploads into multiple artifacts with different names, or
# only upload once. Otherwise you will encounter an error.)
name: ${{ matrix.runner }}-${{ matrix.features }}-${{ github.workflow_sha }}-${{ github.run_attempt }}-failed-syntax-tests
# A file, directory or wildcard pattern that describes what
# to upload.
# Required.
# (Note that within an individual job, there is a limit of
# 500 artifacts that can be created for that job.)
path: ${{ github.workspace }}/runtime/syntax/testdir/failed/
# The desired behavior if no files are found using the
# provided path.
# Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action
# does not fail
# Optional. Default is 'warn'
if-no-files-found: ignore
# Duration after which artifact will expire in days. 0 means
# using default retention.
# Minimum 1 day.
# Maximum 90 days unless changed from the repository
# settings page.
# Optional. Defaults to repository settings.
retention-days: 0
# The level of compression for Zlib to be applied to the
# artifact archive.
# The value can range from 0 to 9.
# For large files that are not easily compressed, a value of
# 0 is recommended for significantly faster uploads.
# Optional. Default is '6'
compression-level: 9
# If true, an artifact with a matching name will be deleted
# before a new one is uploaded.
# If false, the action will fail if an artifact for the
# given name already exists.
# Does not fail if the artifact does not exist.
# Optional. Default is 'false'
overwrite: true Zip files should be available for download:
and there are also REST API endpoints for Curl and friends. |
thanks, I created #14771 for that |
Also:
g:java_allow_cpp_keywords
.java\%[Debug\]StringError
.the modeline.
&encoding
and&termencoding
to "utf-8" for test files.[§ƒɐɘʬʭΑ-Τα-μ]
for test files.Since
vim-6-0u
, non-contained syntax groups can be referredto by using the
contains=TOP...
argument.