-
Notifications
You must be signed in to change notification settings - Fork 44
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
Old error while running with JDK 17 and plugin@2.2.2 #1809
Comments
Hi there, do you mind posting the full error? It's currently cut off so I can't troubleshoot effectively. A few points I'd like to point out to help you self-troubleshoot:
|
Hi @dangmai About the error, yes of course, i send only the first part because is really long: [error] src/main/default/classes/ITA_IFM_UTL045_GestioneAttivitaGC.cls: Error: {"apex.jorje.semantic.compiler.parser.ParserOutput": {"internalErrors": [],"parseErrors": [],"unit": {"@class": "apex.jorje.data.ast.CompilationUnit$ClassDeclUnit","body": {"@class": "apex.jorje.data.ast.ClassDecl","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1191,"endIndex": 45770,"line": 22,"column": 22},"modifiers": [{"@class": "apex.jorje.data.ast.Modifier$GlobalModifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1171,"endIndex": 1177,"line": 22,"column": 2}},{"@class": "apex.jorje.data.ast.Modifier$WithSharingModifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1178,"endIndex": 1190,"line": 22,"column": 9}}],"name": {"@class": "apex.jorje.data.Identifiers$LocationIdentifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1197,"endIndex": 1230,"line": 22,"column": 28},"value": "ITA_IFM_UTL045_GestioneAttivitaGC"},"typeArguments": {},"members": [{"@class": "apex.jorje.data.ast.BlockMember$FieldMember","variableDecls": {"@class": "apex.jorje.data.ast.VariableDecls","modifiers": [{"@class": "apex.jorje.data.ast.Modifier$PublicModifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1234,"endIndex": 1240,"line": 23,"column": 2}},{"@class": "apex.jorje.data.ast.Modifier$StaticModifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1241,"endIndex": 1247,"line": 23,"column": 9}}],"type": {"@class": "apex.jorje.data.ast.TypeRefs$ClassTypeRef","names": [{"@class": "apex.jorje.data.Identifiers$LocationIdentifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1248,"endIndex": 1250,"line": 23,"column": 16},"value": "Id"}],"typeArguments": []},"decls": [{"@class": "apex.jorje.data.ast.VariableDecl","name": {"@class": "apex.jorje.data.Identifiers$LocationIdentifier","loc": {"@class": "apex.jorje.data.IndexLocation","startIndex": 1251,"endIndex": 1267,"line": 23,"column": 19},"value": "useridBarraAtlas"},"assignment": {}}]}},{"@class": "apex.jorje.data.ast.BlockMember$Fi
... To see all, go to the link: https://ctxt.io/2/AAB4XrYnFg (Save before expired, in 1 Day pls) [It was too long to share here in comment box] About the second question, to run the pretiter i use: sed "s/^/'/;s/$/'/" < "$PRETTIER_ARTIFACT_FOLDER/$DETECT_FILE_OUT" | xargs npx prettier --write 2> >(tee "$PRETTIER_ERROR_LOG" | prepend " >> " >&2)
# After the translation should be like:
npx prettier --write <resourcePath_1>
npx prettier --write <resourcePath_2>
npx prettier --write <resourcePath_3>
...
# This is an example output:
>> Start prettify...
src/main/default/classes/ITA_IFM_RefuseHandler_RVC_Test.cls 179ms (unchanged)
src/main/default/classes/ITA_IFM_UTIL_IvaCimp_Test.cls 226ms (unchanged)
src/main/default/classes/ITA_IFM_MS008_EngineDocumentale.cls 297ms (unchanged)
src/main/default/lwc/ita_ifm_lwc071_supply_use_change_comm_ele/ita_ifm_lwc071_supply_use_change_comm_ele.js 191ms
src/main/default/classes/ITA_IFM_SCH510_OnCondition.cls 74ms (unchanged)
src/main/default/classes/ITA_IFM_VFC452_IncomingFlow.cls 111ms (unchanged)
... In my case the problem comes out only with one Apex Class, but when i try to execute prettier in local, it work! The class with the problem, look good, is possible deploy it inside the org and work, so... i honestly don't know to finish this is my {
"plugins": ["prettier-plugin-apex", "@prettier/plugin-xml"],
"printWidth": 600,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"useTabs": true,
"bracketSameLine": true,
"apexInsertFinalNewline": false,
"overrides": [
{
"files": "*.{trigger,cls}",
"options": {"parser": "apex"}
},
{
"files": "*.{apex}",
"options": {"parser": "apex-anonymous"}
},
{
"files": "**/lwc/**/*.html",
"options": {"parser": "lwc"}
},
{
"files": "*.{cmp,page,component,evt}",
"options": {
"parser": "html",
"trailingComma": "none"
}
},
{
"files": "**/aura/**/*.js",
"options": {"trailingComma": "none"}
},
{
"files": "**/aura/**/*.{auradoc,design,app}",
"options": {"parser": "angular"}
},
{
"files": "**/*.xml",
"options": {
"parser": "xml",
"useTabs": false,
"tabWidth": 4,
"xmlWhitespaceSensitivity": "preserve",
"embeddedLanguageFormatting": "off",
"xmlSelfClosingSpace": false
}
}
]
} |
I see, thank you for the detailed description! I believe it's a bug that I was trying to track down in another ticket. If possible, could you send me the source code of the file that fails to |
Hi @dangmai 😁, I have sent you an email with the source files that are causing issues. Could you please confirm if you have received it? I want to make sure I didn't send it to the wrong address. Thanks! |
I've got it, thank you! I'm currently on vacation, so I'll try to look at it when I get back. Thank you again for helping troubleshooting this issue! |
Enjoy your vacation then! |
Self-Troubleshooting Checklist
Describe your issue
Hi, I am running your plugin from bash on a bamboo pipeline.
I ran into an error due to the java version being too old (JDK 11) and we updated the agent to openJDK 17.
Now the error has changed and I get this:
Searching online I found an error similar to the issue: #490
My system configuration on the agent is:
Could you please help us understand if this is the problem?
Thanks a lot in advance
Prettier options (if any)
System Info
The text was updated successfully, but these errors were encountered: