Conversation
|
did you just patch the ouput file instead of adjusting the YAML rules to make your changes more permanent? remember to also run tests, to see if your changes have the desired effect. or make changes / additions to test cases to reflect your change. |
|
let me rephrase my question: you've hacked |
oh, my bad, i did not know that, do i do that and resend the pull? |
here you go, as requested
|
@AlexHaxe alright i tried patching it up like you asked, should filter out functions now |
|
oh, enums' parameters and public static called variable have this minor bug too, no clue how to patch those but if i found it ill update you |
swapped includes in identifiers (vars and finals), and also added a match for enums before including identifiers
havent tested yet so if you could try it with
```hx
enum Color {
Red;
Green;
Blue;
}
```
|
try this |
tiny fix to the YAML that makes it so that not everything pascal case is colored yellow like a class, more specifically functions, called variables and finals, and enum parameters
…-isnt-a-class-(functions,-called-finals/variables,-enum-parameters)) Pascal-Case Colorfix
|
when generating tests are failing, can you adjust them, to make them go green? |
i'm using the one from vscode itself, not sure if its the one up to date or not by the way what do you mean by "can you adjust them, to make them go green?" |
the way i actually test and verify things is by editing the haxe.tmTemplate file instead of the YAML one since thats what the installed extension has, how do i test the yaml version anyway |
I don't think anyone is going to look through that diff to see if your hand-made changes align with what's in yaml file. to run tests the readme has got you covered: https://github.com/vshaxe/haxe-TmLanguage?tab=readme-ov-file#tests |
alright fair enough, i'll try it and get back to you |
|
@AlexHaxe I got everything to work properly (Enums, Vars, Finals) without any conflicts or bugs, except for functions ironically, debugging it all took alot but I think I'm pretty close |
fix alot (var finals enum params, functions, called functions and var finals enums) but also missing a few things
|
@AlexHaxe i got it to work great, just a few things left that im honestly stuck on: is it okay if you inspect and try to fix the remaining bugs? ill try to fix these 2 in the meantime |
|
compared to your initial changes, it feels like your latest version is getting a bit out of hand. the bugs you are describing, are those bugs that exist in the original version, or are they caused by your changes? |
|
alright, I'll try to, sorry to keep you waiting |
|
@AlexHaxe update, honestly for something like this i'd probably need a semantics typescript for it to work, its a bit too much to declare every strict type combination with only using regex, and idk anything about typescript let alone making a semantics lol, i wont give up yet tho ill try looking on docs on how to do it |
semantic highlight is something that needs to be implemented in Haxe languageserver. it's impossible to get the semantics strictly using only regexes. maybe reduce the scope of your fix to the most common occurrences and leave more obscure / uncommon ones as is. I've only ever seen PascalCase for function names in openfl/lime code base. most people I would say are using camelCase for their function names. I would even go so far as to call it the standard for Haxe code. |
|
@AlexHaxe alright, my patch is complete, fixed alot of things and made the code simpler |
|
no clue why it didnt show that i updated |
|
You pushed to the wrong branch, you need to update the |
oops, will do once im home, btw can you try my patch and see if it works? |
|
done |
|
nevermind, when i tried branching it to |
|
Nope, still wrong branch. |
…mLanguage into function-pascal-colorfix
|
seems straight-forward enough, will get back to you once its done |
|
why does github always say my checks fail :/ |
|
@AlexHaxe ❯ npx lix run vshaxe-build --target tm-language-conversion
Failed to get content of /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae/haxelib.json
Failed to invoke `haxelib run-dir vshaxe-build /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae --target tm-language-conversion` because Error: Command failed: haxelib run-dir vshaxe-build /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae --target tm-language-conversion
❯ npx lix run vshaxe-build --target tm-language-tests
Failed to get content of /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae/haxelib.json
Failed to invoke `haxelib run-dir vshaxe-build /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae --target tm-language-tests` because Error: Command failed: haxelib run-dir vshaxe-build /home/MT/haxe/haxe_libraries/vshaxe-build/0.0.1/github/a9972b6e741f99200da6ba41563f780b33a554ae --target tm-language-tests |
well before they were failing because of your rename of as to why vshaxe-build is not working for you, I'm not entirely sure what causes that. maybe your lix is not set up correctly. so maybe check that. alternatively you could look at
|
|
@AlexHaxe not sure if this is good or bad... ❯ haxe -cp src -lib hxnodejs --js bin/test.js -main Test --debug --cmd "node bin/test.js"
Success.
❯ haxe -cp src -lib hxnodejs --js bin/test.js -main Test --cmd "node bin/test.js"
Error: "CommentsInDeclarations.hx.baseline.txt" is not the same as the baseline!
Error: "ConditionalCompilation.hx.baseline.txt" is not the same as the baseline!
Error: "ECheckType.hx.baseline.txt" is not the same as the baseline!
Error: "Enums.hx.baseline.txt" is not the same as the baseline!
Error: "Extractors.hx.baseline.txt" is not the same as the baseline!
Error: "Final.hx.baseline.txt" is not the same as the baseline!
Error: "HaxeInHxml.hxml.baseline.txt" is not the same as the baseline!
Error: "Identifiers.hx.baseline.txt" is not the same as the baseline!
Error: "ImportsUsings.hx.baseline.txt" is not the same as the baseline!
Error: "IntersectionTypes.hx.baseline.txt" is not the same as the baseline!
Error: "IsOperator.hx.baseline.txt" is not the same as the baseline!
Error: "Issue10.hx.baseline.txt" is not the same as the baseline!
Error: "Issue14.hx.baseline.txt" is not the same as the baseline!
Error: "Issue16.hx.baseline.txt" is not the same as the baseline!
Error: "Issue17.hx.baseline.txt" is not the same as the baseline!
Error: "Issue22.hx.baseline.txt" is not the same as the baseline!
Error: "Issue25.hx.baseline.txt" is not the same as the baseline!
Error: "Issue29.hx.baseline.txt" is not the same as the baseline!
Error: "Issue34.hx.baseline.txt" is not the same as the baseline!
Error: "Issue36.hx.baseline.txt" is not the same as the baseline!
Error: "Issue4.hx.baseline.txt" is not the same as the baseline!
Error: "Issue6.hx.baseline.txt" is not the same as the baseline!
Error: "MacroPatterns.hx.baseline.txt" is not the same as the baseline!
Error: "MacroReification.hx.baseline.txt" is not the same as the baseline!
Error: "NestedFunction.hx.baseline.txt" is not the same as the baseline!
Error: "New.hx.baseline.txt" is not the same as the baseline!
Error: "NullCoalescing.hx.baseline.txt" is not the same as the baseline!
Error: "PatternMatching.hx.baseline.txt" is not the same as the baseline!
Error: "StringInterpolation.hx.baseline.txt" is not the same as the baseline!
Error: "TrailingCommas.hx.baseline.txt" is not the same as the baseline!
Error: "TryCatch.hx.baseline.txt" is not the same as the baseline!
Error: "TypeParameters.hx.baseline.txt" is not the same as the baseline!
Error: "UntypedFunctions.hx.baseline.txt" is not the same as the baseline!
Failed!
Error: Command failed with error 1 |
|
I get the same output for debug and non-debug builds. so must be on your end. |
what can i do about it? |
I'm not sure, because there should be no difference whether regardless these unittest either need to be updated to reflect your changes (because your changes improved handling in those cases) or they show that some (or one) of your changes affects more things than what you intended. |
|
sorry for not being up to date, had to deal with life stuff, will try to finish this up quickly tho |
|
alright it's complete, no more changes needed, all thats left is the checks you asked me to do |
|
@AlexHaxe no matter what i do it tells me all checks failed, what do i do? |
|
test cases assume existing behaviour, so they might fail because your adjustments fix things that were "broken" or mislabeled before. or tests might fail because your changes break things that they shouldn't. what you need to do is look through your test results, diff them against expected classification results (see chances are there is a mixture of both, so some things will need to be updated and some things might need fixing. |
|
this is genuinely so tiring to deal with, the whole check thing needs like file to file specific checks and its very annoying imo. feels like it's taking forever |
|
i'm halfway thru tho so i tthink |

makes it so that if you make a function with a pascal-case, it wont be colored yellow like it's a class, and instead be colored blue like a function