"is not a relative path" exception thrown when `:libs` directory is provided.


This problem shows up in this simple case:

In the compiler config set :libs to ["js_libs"]

Create a GCL file in "js_libs"

In the main cljs file require the GCL lib:

This should produce the following stacktrace:




Martin Klepsch
July 8, 2017, 9:44 PM

Tested the patch with cljsjs/incremental-dom. Working as advertised 👍

FWIW, in contrast to Francis' observations I thought this only affected :libs with single segment goog.provide names. After stumbling into this with incremental-dom I tried to reproduce it with openlayers but I couldn't reproduce the issue there.

António Monteiro
July 8, 2017, 8:14 PM

Patch attached.

David Nolen
July 8, 2017, 3:21 PM

The patch must supply a test.

Francis Avila
July 3, 2017, 2:35 AM

I ran in to this issue on a large, complex project which I was upgrading from 1.8.51 to a few commits short of 1.9.655. However, I never created a minimal case. Some more information I can add:

  1. This is a regression since 1.8.51.

  2. I experienced this on a project where :libs and :src were the same. (Cljs and goog-compatible js were intermingled in same source root.) I thought that might have been relevant but it looks like it is not.

  3. The length of the goog-provided namespace does not matter. (One segment and many-segment both fail.)

  4. A workaround is to include the full path to the goog file in :libs. For example, {{:libs ["js_libs/tabby.js"] }} will not fail. This is the workaround I used in my project.



David Nolen


Bruce Hauman





Code and Test