bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Individual language errors should be logged on "Language validation logged N errors. Giving up"

Open kaorukobo opened this issue 7 months ago • 3 comments

Describe the Bug

When bolt apply fails due to Language validation logged N errors. Giving up, the individual language errors are not reported even in bolt-debug.log.

Expected Behavior

The individual language errors should be logged to both bolt-debug.log and trace level output.

Steps to Reproduce

/opt/puppetlabs/bin/bolt project init foo

mkdir -p modules/bar/manifests

cat > modules/bar/manifests/baz.pp <<'PUPPET'
class bar::baz {

}

# the part that will cause 1st "Unacceptable location" error.
class qux {

}

# the part that will cause 2nd "Unacceptable location" error.
class quo {

}
PUPPET

bolt apply -t localhost -e "class { 'bar::baz': }"

When we run the above reproduction, all we get is the fact that there are two language errors as shown below. But we cannot know specific errors causing this, even from bolt-debug.log.

  Apply failed to compile for localhost: Language validation logged 2 errors. Giving up (file: /private/tmp/reproduce-2311-langerror.sh-tmp/modules/bar/manifests/baz.pp) on node localhost

Environment

  • 3.27.4
  • macOS 13.5 (Ventura)

Additional Context

(none)

kaorukobo avatar Nov 29 '23 04:11 kaorukobo