build_libcnb_buildpacks_dependency_graph()
displays the wrong error for buildpack.toml
IO and TOML parsing errors
#708
Labels
The
determine_buildpack_kind()
function currently returnsOption<BuildpackKind>
:libcnb.rs/libcnb-package/src/buildpack_kind.rs
Lines 6 to 8 in 2698a71
Unfortunately, this means it treats "this isn't a buildpack" the same as "an error occurred trying to work out what type of buildpack this is" (which in practice can be IO errors or TOML parsing errors).
This has the knock on impact of the filter here (inside
build_libcnb_buildpacks_dependency_graph()
) skipping over buildpacks with malformed TOML:https://github.com/heroku/libcnb.rs/blob/2698a713edf19034e382aa702e12acc1516da8fa/libcnb-package/src/buildpack_dependency_graph.rs#L36C1-L41
Which means that the packaging process continues on further than it should, and then a confusing error message is shown instead of a "unable to parse TOML" error:
The text was updated successfully, but these errors were encountered: