Skip to content

Boot Troubleshooting

Gregg Reynolds edited this page Feb 11, 2016 · 24 revisions

Boot Troubleshooting

Where are my outputs?

Scenario: $ boot aot -a does not generate class files.

Resolution:

  • check your source paths: in build.boot you should have something like (set-env! :source-paths #{"src/clj"} ...)

  • make sure you have some .clj files in your source paths

  • add the show task to your pipeline to see what files are produced by your task. For example, boot aot show --fileset will list the files in the input fileset fed to aot - that’s because boot aot will just pass the input to the output fileset without compiling anything. To make it compile you must pass it a flag, -a for all or -n foo.bar to compile namespace foo.bar. See boot aot -h.

  • to see the results of aot, run boot aot -a show --fileset. Here the aot task will compile all .clj files in your source paths, put them into its output fileset, and pass it to the next task, show, which will display them in a nicely formatted tree. NOTE: show will pass its input unchanged to the next task. If there is no next task, as in this example, nothing will be written to the target path.

  • check your boot.properties files - ~/.boot/boot.properties and ./boot.properties. If you see BOOT_EMIT_TARGET=no, your task will not write its output to disk - you will need to add the target task to your pipeline. See BOOT_EMIT_TARGET.

  • add the target task to your pipeline: boot aot -a show --fileset target -d "build/foo". The job of the target task is to synchronize its input to the target path (directory). Here the contents of "build/foo" should match the listing produced by show --fileset. Of course, you can omit show --fileset from the pipeline, and pass the compiled fileset directly to target.

NOTE: The target task performs a one-way, clean sync. It cleans the target path before it writes the fileset - anything in the target path will be deleted!

General Troubleshooting Tips

  • Suppose you do boot -v foobar and you get a stack trace. You can then do boot -vb |cat -n and see the matching line numbers. Actually you should do boot -vb foobar to get the exact same generated code; just add -b to the thing that caused the error.

  • boot show is your friend. remember: it’s a task. that means you can insert it in anywhere in a pipeline in order to dump useful info to stdout. For example, boot show -f my-task show -f will print the before and after filesets for my-task.

Clone this wiki locally