bad formed yaml tabulation causing chalet to hang indefinetly
Closed this issue ยท 12 comments
First: Thanks for Yaml, I've just converted everything from json because the format doesn't accept commented out lines.
I found out some malformed yaml, mixing spaces and tabs was causing chalet to hang without an error message.
ZED editor with yaml validator pointed out the issue on Yaml file
Can you share the chalet.yaml file that is parsing incorrectly? I'll look into this over the weekend.
it can be any yml if you substitute two spaces by one tab
name: libsof
version: "0.1.3"
externalDependencies:
freetype:
repository: https://gitlab.freedesktop.org/freetype/freetype
tag: VER-2-13-3
kind: git
targets:
freetype:
kind: cmakeProject
location: ${external:${name}}
recheck: false
rebuild: false
defines:
- BUILD_SHARED_LIBS=OFF
- CMAKE_BUILD_TYPE=Release
- CMAKE_POSITION_INDEPENDENT_CODE=ON
# - CMAKE_INCLUDE_OUTPUT_DIRECTORY=include
# - CMAKE_INSTALL_INCLUDEDIR=include
defines[platform:macos]:
- CMAKE_OSX_DEPLOYMENT_TARGET=10.9
- CMAKE_OSX_ARCHITECTURES=x86_64;arm64
distribution:
freetype:
kind: archive
# condition: "[:macos]"
format: zip
include:
- ${externalBuild:${name}}**.a
- ${external:${name}}/include
It doesn't hang for me, it just has a misleading error:
> Reading Build File [chalet.yaml] ...
ERROR: Failed to validate the file: chalet.yaml
ERROR: The object '(root)' contains an unknown property 'defines[platform:macos]': Not allowed.
I think the parser just skips over the line with the tab character, but it should explicitly call that out.
I'll try to reproduce again and report back (or close this one)
Even if you can't repro it, Let's keep it open. I do want to try to improve the errors.
I found the infinite loop. It happens when object arrays aren't indented once:
(loops)
testing:
- array: test
(works)
testing:
- array: test
Okay, this has been fixed. You can try it out in the version below:
https://github.com/chalet-org/chalet/releases/tag/snapshot-main-202412210242
Great! I'm testing with latest on github actions, will test this soon
in the meantime, another silent condition here:
I probably tried to do something unimplemented, in distribution I've tried to use this line:
include[:!windows]:
but I suppose this is only allowed in "condition" now.
name: libsof
version: "0.1.3"
externalDependencies:
freetype:
repository: https://gitlab.freedesktop.org/freetype/freetype
tag: VER-2-13-3
kind: git
targets:
freetype:
kind: cmakeProject
location: ${external:${name}}
recheck: false
rebuild: false
defines:
- BUILD_SHARED_LIBS=OFF
- CMAKE_BUILD_TYPE=Release
# - CMAKE_BUILD_TYPE=Release
- CMAKE_POSITION_INDEPENDENT_CODE=ON
# - CMAKE_INCLUDE_OUTPUT_DIRECTORY=include
# - CMAKE_INSTALL_INCLUDEDIR=include
defines[platform:macos]:
- CMAKE_OSX_DEPLOYMENT_TARGET=10.9
- CMAKE_OSX_ARCHITECTURES=x86_64;arm64
distribution:
freetype:
kind: archive
# condition: "[:macos]"
format: zip
include:
- ${external:${name}}/include
# include[:macos]:
# - ${externalBuild:${name}}**.a
# include[:web]:
# - ${externalBuild:${name}}**.a
# include[:linux]:
# - ${externalBuild:${name}}**.a
include[:windows]:
- ${externalBuild:${name}}**.lib
- ${externalBuild:${name}}**.pc
include[:!windows]: #macos emscripten linux rpi
- ${externalBuild:${name}}**.a
# - ${externalBuild:${name}}*.a
Ah, that's a weird one. It's not stripping the trailing comment in the include[:!windows]
line correctly and failing incorrectly for the :
.
The above is fixed in the latest release. Let me know if you find any other issues with the yaml parser.
https://github.com/chalet-org/chalet/releases/tag/snapshot-main-202412240226
Great! do you know if the latest will have any change in version?
chalet --version
Chalet version 0.7.24
I'm using a lot here in this actions, choosing to install prerelease version
https://github.com/dimitre/ofLibs/actions
Not yet. I know it's confusing. I wanted to do more for the 0.8 release originally. I'll get back to a normal release soon.