-
-
Notifications
You must be signed in to change notification settings - Fork 177
Boot Troubleshooting
Scenario: $ boot aot -a does not generate class files.
Resolution:
-
check your source paths: in
build.bootyou should have something like(set-env! :source-paths #{"src/clj"} ...) -
make sure you have some .clj files in your source paths
-
add the
showtask to your pipeline to see what files are produced by your task. For example,boot aot show --filesetwill list the files in the input fileset fed to aot - that’s becauseboot aotwill just pass the input to the output fileset without compiling anything. To make it compile you must pass it a flag,-afor all or-n foo.barto compile namespace foo.bar. Seeboot aot -h. -
to see the results of aot, run
boot aot -a show --fileset. Here theaottask 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:showwill 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.propertiesand./boot.properties. If you seeBOOT_EMIT_TARGET=no, your task will not write its output to disk - you will need to add thetargettask to your pipeline. See BOOT_EMIT_TARGET. -
add the
targettask to your pipeline:boot aot -a show --fileset target -d "build/foo". The job of thetargettask is to synchronize its input to the target path (directory). Here the contents of "build/foo" should match the listing produced byshow --fileset. Of course, you can omitshow --filesetfrom the pipeline, and pass the compiled fileset directly totarget.
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!
-
Suppose you do
boot -v foobarand you get a stack trace. You can then doboot -vb |cat -nand see the matching line numbers. Actually you should doboot -vb foobarto get the exact same generated code; just add -b to the thing that caused the error. -
boot showis 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 -fwill print the before and after filesets for my-task.
You can find other developers and users in the #hoplon channel on freenode IRC or the boot slack channel.
If you have questions or need help, please visit the Discourse site.
- Environments
- Boot environment
- Java environment
- Tasks
- Built-ins
- Third-party
- Tasks Options
- Filesets
- Target Directory
- Pods
- Boot Exceptions
- Configuring Boot
- Updating Boot
- Setting Clojure version
- JVM Options
- S3 Repositories
- Scripts
- Task Writer's Guide
- Require inside Tasks
- Boot for Leiningen Users
- Boot in Leiningen Projects
- Repl reloading
- Repository Credentials and Deploying
- Snippets
- Troubleshooting
- FAQ
- API docs
- Core
- Pod
- Util
