Giter Club home page Giter Club logo

Comments (8)

danielcompton avatar danielcompton commented on August 18, 2024

@crisptrutski we're doing ok running :optimizations :none on our projects. What problems are you having specifically?

from doo.

crisptrutski avatar crisptrutski commented on August 18, 2024

When using Boot compiled files are created in a temp directory, not at the assumed relative path to the project. That means that require statements for Closure generated by the CLJS shim for :none use incorrect paths, and the bootstrapping fails:

Running cljs tests...ClojureScript could not load :main, did you forget to specify
   :asset-path?
ERROR: doo was not loaded from the compiled script.

This is precisely the scenario mentioned in the linked CLJS ticket.

You could run the tests here against doo with and without this branch to see the difference.

This is a blocker for upgrading Boot tooling to use the latest doo (0.1.4 did not have this problem), but open to any solution - admit this one is not pretty.

from doo.

danielcompton avatar danielcompton commented on August 18, 2024

Gotcha, that makes more sense. I'll have a look at how boot does it and see what I can think of too.

from doo.

bensu avatar bensu commented on August 18, 2024

@crisptrutski CLJS-1444 deals with a node-only problem. Is the problem you are reporting also isolated to node?

from doo.

crisptrutski avatar crisptrutski commented on August 18, 2024

@bensu no, it's actually been affecting phantom in my testing - looks like I didn't read the ticket closely enough.

Here's the actual shim that's been generated:

var CLOSURE_UNCOMPILED_DEFINES = null;
if(typeof goog == "undefined") document.write('<script src="output.out/goog/base.js"></script>');
document.write('<script src="output.out/cljs_deps.js"></script>');
document.write('<script>if (typeof goog != "undefined") { goog.require("boot.cljs.main750"); } else { console.warn("ClojureScript could not load :main, did you forget to specify :asset-path?"); };</script>');

from doo.

bensu avatar bensu commented on August 18, 2024

Thanks @crisptrutski

To solve this I'll need a better understanding of boot-cljs. Luckily I've already been using it in one project but it will take a while until we figure out the best way to re conciliate these two execution models.

from doo.

crisptrutski avatar crisptrutski commented on August 18, 2024

Totally understand you wanting to avoid a knee-jerk solution!

Would you be open to a scaled back PR in the meantime, which just provides a "command-dir" option, and skipping any such magic around the compiler options? This would be enough for me to cut a boot-cljs-test release, without any implicit magic.

If not, I can wait - and maybe find the time to help 😄

from doo.

crisptrutski avatar crisptrutski commented on August 18, 2024

Since @danielcompton made the same suggestion, I've gone ahead and created the PR ✌️ 🌴

from doo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.