You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "g051051 (via GitHub)" <gi...@apache.org> on 2024/05/05 21:15:22 UTC
[I] Karavan kamelet loader fails to load with Windows line endings [camel-karavan]
g051051 opened a new issue, #1259:
URL: https://github.com/apache/camel-karavan/issues/1259
### Describe the bug
I'm using Dirigible, which includes the Karavan editor capability. When the project is checked out under Windows and built, the editor fails to start due to `YAMLException: expected a single document in the stream, but found more`. This was tracked into the code that loads the `kamelets.yaml` file. It has an expression like this:
`
n[0].split("\n---\n").map((function(e) {
`
This is attempting to split the YAML sub-documents and feed them into the `saveKamelets` function. However, if the files were checked out on Windows with `core.autocrlf` set to true, git will change the line ending to be Windows style CR/LF instead of LF. This beaks the `split` call, the entire file is passed to `saveKamelets`, and the editor crashes with a blank error toast.
### Steps to reproduce the behavior
1. Check out dirigible 10.4.1.
2. Build and run it.
3. Create a project.
4. Create a .camel file in the project.
5. Double-click to open it.
### Variant
Web Application
### Container Management (if applicable)
None
### Operating System (if applicable)
Windows
### Version
4.4.0
### Relevant log output
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Karavan kamelet loader fails to load with Windows line endings [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin commented on issue #1259:
URL: https://github.com/apache/camel-karavan/issues/1259#issuecomment-2102707441
If you are using Dirigible, then you better ask Dirigible.
Karavan Designer is supposed to be used in Karavan VS Code Extension of in Karavan Application.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Karavan kamelet loader fails to load with Windows line endings [camel-karavan]
Posted by "g051051 (via GitHub)" <gi...@apache.org>.
g051051 commented on issue #1259:
URL: https://github.com/apache/camel-karavan/issues/1259#issuecomment-2102722085
The issue is with the line handling, because it's essentially hard-coded to assume "\n". Dirigible is just packaging the generated Karavan release as a bundle. This issue occurs regardless of whether Dirigible is involved or not, since it's related to a specific choice in the kamelet loader.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Karavan kamelet loader fails to load with Windows line endings [camel-karavan]
Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin closed issue #1259: Karavan kamelet loader fails to load with Windows line endings
URL: https://github.com/apache/camel-karavan/issues/1259
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org