Git Product home page Git Product logo

bootleg's People

Contributors

agilecreativity avatar borkdude avatar chr15m avatar dominicfreeston avatar retrogradeorbit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootleg's Issues

Fix enlive/hickory :type encoding incompatibility

Enlive encodes it's internally generated hickory with missing :type fields. eg {:tag :blink, :attrs nil, :content ["FOO"]} instead of {:type :element :tag :blink, :attrs nil, :content ["FOO"]}

This then explodes when passing through hickory's conversion utilities.

See #2

Running from file in same directory requires leading `./`

Somehow this works:

bootleg -e '(doseq [f (glob "content/posts/*.markdown")] (println f))'

but this fails on my machine (MacOS 10.14.6), bootleg Version: 0.1.7:

cat '(doseq [f (glob "content/posts/*.markdown")] (println f))' >> bootlegrepro.clj
bootleg bootlegrepro.clj
Exception in thread "main" java.lang.NullPointerException
	at bootleg.file$relativise.invokeStatic(file.clj:57)
	at bootleg.file$relativise.invoke(file.clj:53)
	at clojure.core$partial$fn__5824.invoke(core.clj:2624)
	at clojure.core$map$fn__5851.invoke(core.clj:2755)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:531)
	at clojure.core$seq__5387.invokeStatic(core.clj:137)
	at clojure.core$seq__5387.invoke(core.clj:137)
	at sci.impl.interpreter$fn_call.invokeStatic(interpreter.cljc:428)
	at sci.impl.interpreter$fn_call.invoke(interpreter.cljc:428)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:474)
	at sci.impl.interpreter$eval_call.invoke(interpreter.cljc:460)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:503)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:492)
	at sci.impl.interpreter$fn_call.invokeStatic(interpreter.cljc:428)
	at sci.impl.interpreter$fn_call.invoke(interpreter.cljc:428)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:474)
	at sci.impl.interpreter$eval_call.invoke(interpreter.cljc:460)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:503)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:492)
	at sci.impl.interpreter$eval_form.invokeStatic(interpreter.cljc:547)
	at sci.impl.interpreter$eval_form.invoke(interpreter.cljc:538)
	at sci.impl.interpreter$eval_string_STAR_.invokeStatic(interpreter.cljc:557)
	at sci.impl.interpreter$eval_string_STAR_.invoke(interpreter.cljc:550)
	at sci.impl.interpreter$eval_string$fn__1514.invoke(interpreter.cljc:570)
	at sci.impl.interpreter$eval_string.invokeStatic(interpreter.cljc:567)
	at sci.impl.interpreter$eval_string.invoke(interpreter.cljc:563)
	at sci.core$eval_string.invokeStatic(core.cljc:169)
	at sci.core$eval_string.invoke(core.cljc:137)
	at bootleg.hiccup$process_hiccup_data.invokeStatic(hiccup.clj:90)
	at bootleg.hiccup$process_hiccup_data.invoke(hiccup.clj:22)
	at bootleg.hiccup$process_hiccup.invokeStatic(hiccup.clj:106)
	at bootleg.hiccup$process_hiccup.invoke(hiccup.clj:97)
	at bootleg.core$process.invokeStatic(core.clj:37)
	at bootleg.core$process.invoke(core.clj:35)
	at bootleg.core$_main.invokeStatic(core.clj:77)
	at bootleg.core$_main.doInvoke(core.clj:57)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at bootleg.core.main(Unknown Source)

native image bootleg System/getenv fails

$ lein run -d -e '(System/getenv "FOO")'
nil
$ ./bootleg -d -e '(System/getenv "FOO")'
bootleg: script error at line , column : Illegal argument: No matching method getenv found taking 1 args

Going to be a reflection issue

base level edamame exceptions are not nice-printed

Exception in thread "main" clojure.lang.ExceptionInfo: The map literal starting with :class contains 3 form(s). Map literals must contain an even number of forms. [at line 43, column 32] {:row 43, :col 32}
	at edamame.impl.parser$throw_reader.invokeStatic(parser.cljc:62)
	at edamame.impl.parser$throw_reader.invoke(parser.cljc:50)
	at edamame.impl.parser$throw_odd_map.invokeStatic(parser.cljc:261)
	at edamame.impl.parser$throw_odd_map.invoke(parser.cljc:259)
	at edamame.impl.parser$parse_map.invokeStatic(parser.cljc:279)
	at edamame.impl.parser$parse_map.invoke(parser.cljc:272)
	at edamame.impl.parser$dispatch.invokeStatic(parser.cljc:350)
...

Exception in thread "main" java.lang.NullPointerException

I'm probably doing something dumb here.

site.clj

(-> (html "index.template.html") (enlive/at [:section#content] (enlive/content (markdown "README.md"))))
  • README.md is a standard markdown.
  • index.template.html is a standard HTML file with <section id="content"></section> in it.

Exception

Exception in thread "main" java.lang.NullPointerException
	at bootleg.utils$convert_to.invokeStatic(utils.clj:153)
	at bootleg.utils$convert_to.invoke(utils.clj:150)
	at bootleg.namespaces$at__2990.invokeStatic(namespaces.clj:135)
	at bootleg.namespaces$at__2990.doInvoke(namespaces.clj:125)
	at clojure.lang.RestFn.applyTo(RestFn.java:139)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at sci.impl.interpreter$do_recur_BANG_.invokeStatic(interpreter.cljc:123)
	at sci.impl.interpreter$do_recur_BANG_.doInvoke(interpreter.cljc:121)
	at clojure.lang.RestFn.applyTo(RestFn.java:139)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:660)
	at sci.impl.interpreter$apply_fn.invokeStatic(interpreter.cljc:132)
	at sci.impl.interpreter$apply_fn.invoke(interpreter.cljc:130)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:306)
	at sci.impl.interpreter$eval_call.invoke(interpreter.cljc:271)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:320)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:310)
	at sci.impl.interpreter$eval_do$fn__707.invoke(interpreter.cljc:62)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:62)
	at sci.impl.interpreter$eval_do.invoke(interpreter.cljc:57)
	at sci.impl.interpreter$eval_string.invokeStatic(interpreter.cljc:370)
	at sci.impl.interpreter$eval_string.invoke(interpreter.cljc:352)
	at sci.core$eval_string.invokeStatic(core.cljc:35)
	at sci.core$eval_string.invoke(core.cljc:5)
	at bootleg.hiccup$process_hiccup_data.invokeStatic(hiccup.clj:54)
	at bootleg.hiccup$process_hiccup_data.invoke(hiccup.clj:22)
	at bootleg.hiccup$process_hiccup.invokeStatic(hiccup.clj:68)
	at bootleg.hiccup$process_hiccup.invoke(hiccup.clj:64)
	at bootleg.core$process.invokeStatic(core.clj:34)
	at bootleg.core$process.invoke(core.clj:32)
	at bootleg.core$_main.invokeStatic(core.clj:66)
	at bootleg.core$_main.doInvoke(core.clj:49)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at bootleg.core.main(Unknown Source)

YAML upgrade to SnakeYAML 2.0

Hi - I also had a problem with the stale io.forward/yaml and this issue:

https://github.com/owainlewis/yaml/issues/28

So, I wrote my own YAML wrapper to SnakeYAML 2.0. You can see it here:

https://github.com/cloojure/tupelo/blob/master/src/clj/tupelo/parse/yaml.clj

Feel free to either reference this or copy it into your own lib.

Alan

Add auto-coercing enlive wrapper functions

In order to improve the data coercion problems experienced by new users (see #2), write some wrapper calls around enlive functions that auto-coerce the different datatypes to hickory.

support reagent :style hashmaps in hiccup forms

$ bootleg -e '[:div {:style "color:red;"}]'
<div style="color:red;"></div>
$ bootleg -e '[:div {:style {:color "red"}}]'
Exception in thread "main" java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String
	at quoin.text$html_escape.invokeStatic(text.clj:12)
	at quoin.text$html_escape.invoke(text.clj:4)
	at hickory.utils$html_escape.invokeStatic(utils.cljc:27)
	at hickory.utils$html_escape.invoke(utils.cljc:25)
	at hickory.render$render_hiccup_attrs$iter__367__371$fn__372.invoke(render.cljc:82)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:51)
	at clojure.lang.RT.seq(RT.java:531)
	at clojure.core$seq__5387.invokeStatic(core.clj:137)
	at clojure.core$filter$fn__5878.invoke(core.clj:2809)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:58)
	at clojure.lang.RT.seq(RT.java:531)
	at clojure.core$seq__5387.invokeStatic(core.clj:137)
	at clojure.core$sort.invokeStatic(core.clj:3113)
	at clojure.core$sort.invokeStatic(core.clj:3102)
	at clojure.core$sort.invoke(core.clj:3102)
	at hickory.render$render_hiccup_attrs.invokeStatic(render.cljc:85)
	at hickory.render$render_hiccup_attrs.invoke(render.cljc:69)
	at hickory.render$render_hiccup_element.invokeStatic(render.cljc:102)
	at hickory.render$render_hiccup_element.invoke(render.cljc:93)
	at hickory.render$render_hiccup_form.invokeStatic(render.cljc:113)
	at hickory.render$render_hiccup_form.invoke(render.cljc:106)
	at hickory.render$hiccup_to_html$fn__394.invoke(render.cljc:141)
...

[:link] tags produce malformed output in xml attempt

[:rss {:version "2.0"}
 [:channel
  [:title "Epiccastle Blog"]
  [:description "Epiccastle.io Updates"]
  [:link "https://epiccastle.io/blog/"]
  [:lastBuildDate "Mon, 06 Sep 2010 00:01:00 +0000"]
  [:pubDate "Sun, 06 Sep 2009 16:20:00 +0000"]
  [:ttl "1800"]
  [:item
   [:title "Example Blog Post"]
   [:description "This is some examples"]
   [:link2 "https://epiccastle.io/blog/1/"]
   [:gid "7bd204c6-1655-4c27-aeee-53f933c5395f"]
   [:pubDate "Sun, 06 Sep 2009 16:20:00 +0000"]]

  ]
 ]

produces

<rss version="2.0"><channel><title>Epiccastle Blog</title><description>Epiccastle.io Updates</description><link><lastbuilddate>Mon, 06 Sep 2010 00:01:00 +0000</lastbuilddate><pubdate>Sun, 06 Sep 2009 16:20:00 +0000</pubdate><ttl>1800</ttl><item><title>Example Blog Post</title><description>This is some examples</description><link2>https://epiccastle.io/blog/1/</link2><gid>7bd204c6-1655-4c27-aeee-53f933c5395f</gid><pubdate>Sun, 06 Sep 2009 16:20:00 +0000</pubdate></item></channel></rss>

notice link is mangled white link2 is intact

Support for Selemer builtin tags

When trying to parse a template using Selmer builtin tags such as include and extends a Bootleg error is returned:

bootleg -e '(selmer "page.html”)’
bootleg: script error at line 1, column 1: : “unrecognized tag: :extends - did you forget to close a tag?”

Set-up:

Selemer tags used in page.html:

{% extends “base.html" %}
{% include “partial.html” %}

yogthos : You can't use include in conjunction with render because render expects a string containing the complete template. You should use render-file instead and put both templates in separate files.

Write file output option error

Hi,

When I use --output option, the output file is created but is empty and I have this error:

$ bootleg -o test.html simple.clj
Exception in thread "main" java.lang.IllegalArgumentException: No matching method write found taking 1 args for class java.io.BufferedWriter
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:127)
	at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)
	at bootleg.core$output_result.invokeStatic(core.clj:46)
	at bootleg.core$output_result.invoke(core.clj:39)
	at bootleg.core$_main.invokeStatic(core.clj:72)
	at bootleg.core$_main.doInvoke(core.clj:52)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at bootleg.core.main(Unknown Source)

Best regards.

Add a REPL

Starting bootleg with no arguments should launch a REPL.

File not found error could be friendlier

Currently a big fat stack trace. :)

$ bootleg goober
Exception in thread "main" java.io.FileNotFoundException: goober
	at com.oracle.svm.core.posix.PosixUtils.fileOpen(PosixUtils.java:235)
	at java.io.FileInputStream.open(FileInputStream.java:481)
...

Quickstart example should walk you through one of the examples

A beginner coming to this for the first time and seeing the "quickstart" examples with -e will probably get confused. What I want to see as a new user is basically the contents of examples/quickstart and the clojure code that would be required to render that into a site. I'd want this in a conversational tone like:

Quickstart

Imagine you have an HTML template like this:

<bod>...some valid code here...</body>

You want to merge that with a JSON file like this:

...

Then you want to include some Markdown from a file called README.md which looks like this:

...

And so on.

🤔 How to build an entire site ? #watch-mode #routing

Hi @retrogradeorbit

Thanks for writing this package. I love the appeal of a small bash tool that spits html.
It does what it claims to do really well.

However most sites I work on need more than ability to convert a template->html.

For example:

  • I generally have a Shell component to render Head
  • I have some form of routing
  • Some scripts that need to be injected globally
  • Watch mode, to update the build when the source changes, etc

What's your goto way to solve these problems?
Is it a part of bootleg philosophy or do you consider this as something external, maybe a set of babashka scripts.

Thank you

Build failed when trying build with graalvm-ce-java11-19.3.0

First of all, thanks for the great project.

When trying to build with graalvm-ce-java11-19.3.0 on OSX it seems to be error.
It works perfectly when trying with graalvm-ce-java8-19.3.0.
I will add the stacktrace of the problem once I have test this again soon.
This is the result of running the following command:
My environment:

make clean all

The relevant error logs:

...
Printing initializer configuration to /Users/bchoomnuan/apps/retrogradeorbit--bootleg/reports/initializer_configuration_20191218_213958.txt
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
[thread:24] scope: ForkJoinPool-2-worker-7
  [thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis
  Context: StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
  Context: AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
      [thread:24] scope: ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles
      Context: StructuredGraph:4820{HotSpotMethod<Invokers$Holder.invoke_MT(Object, Object, Object, Object)>}
      Exception raised in scope ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase.IntrinsifyMethodHandles: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
      To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
      	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:483)
      	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:194)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2110)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1793)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1682)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1630)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1615)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5168)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3286)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3093)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:977)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:871)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
      	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:221)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:340)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
      	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
      	at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
      	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:511)
      	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
      	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
      	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
      	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
      	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
      	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
      	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
      
      Context obj StructuredGraph:4820{HotSpotMethod<Invokers$Holder.invoke_MT(Object, Object, Object, Object)>}
      Context obj com.oracle.svm.hosted.phases.AnalysisGraphBuilderPhase@7f0b3701
      Context obj StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
      Context obj AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
      Context obj com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder@19bd70c
    Exception raised in scope ForkJoinPool-2-worker-7.ClosedWorldAnalysis.AnalysisGraphBuilderPhase: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
    To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
    	at parsing clojure.lang.Reflector.canAccess(Reflector.java:49)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2475)
    	at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.throwParserError(SharedGraphBuilderPhase.java:93)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3291)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3093)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:977)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:871)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:221)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:340)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
    	at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
    	at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
    	at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:511)
    	at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
    	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
    Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.Invokers$Holder.invoke_MT(Object, Object, Object, Object)
    To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
    	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:483)
    	at com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:194)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2110)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1793)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1682)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1630)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1615)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5168)
    	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3286)
    	... 22 more
    
    Context obj com.oracle.svm.hosted.phases.AnalysisGraphBuilderPhase@7f0b3701
    Context obj StructuredGraph:4804{AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>}
    Context obj AnalysisMethod<Reflector.canAccess -> HotSpotMethod<Reflector.canAccess(Method, Object)>>
    Context obj com.oracle.svm.hosted.analysis.flow.SVMMethodTypeFlowBuilder@19bd70c

java.io.FileNotFoundException libsunec.so

$ bootleg 
Exception in thread "main" java.io.FileNotFoundException: /home/crispin/.bootleg/libs/libsunec.so
	at com.oracle.svm.core.posix.PosixUtils.fileOpen(PosixUtils.java:235)
	at java.io.FileOutputStream.open(FileOutputStream.java:580)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at clojure.java.io$fn__11504.invokeStatic(io.clj:319)
	at clojure.java.io$fn__11504.invoke(io.clj:319)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at clojure.java.io$copy.invokeStatic(io.clj:406)
	at clojure.java.io$copy.doInvoke(io.clj:391)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at bootleg.config$setup.invokeStatic(config.clj:21)
	at bootleg.config$setup.invoke(config.clj:13)
	at bootleg.config$init_BANG_.invokeStatic(config.clj:31)
	at bootleg.config$init_BANG_.invoke(config.clj:23)
	at bootleg.core$_main.invokeStatic(core.clj:52)
	at bootleg.core$_main.doInvoke(core.clj:49)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at bootleg.core.main(Unknown Source)

Hiccup and hiccup-seq?

In the readme, you mention hiccup can't represent sibling elements like:

<p>one</p><p>two</p>

But I'm pretty sure you can do this in Hiccup by wrapping it in a list like:

(list [:p "one"] [:p "two"])

hiccup-seq containing nil causes NPE on conversion

hiccup-seq conversion does not ignore nil elements like reagent.

$ bootleg -e '(convert-to [nil] :html)'
Exception in thread "main" java.lang.NullPointerException
	at bootleg.utils$convert_to.invokeStatic(utils.clj:274)
	at bootleg.utils$convert_to.invoke(utils.clj:271)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:286)
	at sci.impl.interpreter$eval_call.invoke(interpreter.cljc:250)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:302)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:292)
	at sci.impl.interpreter$eval_do$fn__688.invoke(interpreter.cljc:64)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:64)
	at sci.impl.interpreter$eval_do.invoke(interpreter.cljc:59)
	at sci.impl.interpreter$eval_edn_vals.invokeStatic(interpreter.cljc:355)
	at sci.impl.interpreter$eval_edn_vals.invoke(interpreter.cljc:354)
	at sci.impl.interpreter$eval_string.invokeStatic(interpreter.cljc:363)
	at sci.impl.interpreter$eval_string.invoke(interpreter.cljc:357)
	at sci.core$eval_string.invokeStatic(core.cljc:37)
	at sci.core$eval_string.invoke(core.cljc:5)
	at bootleg.hiccup$process_hiccup_data.invokeStatic(hiccup.clj:60)
	at bootleg.hiccup$process_hiccup_data.invoke(hiccup.clj:23)
	at bootleg.core$_main.invokeStatic(core.clj:67)
	at bootleg.core$_main.doInvoke(core.clj:52)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at bootleg.core.main(Unknown Source)

Unexpectedly lazy function

Not sure if this is a bug or not.

Same files as previous issue.

(mustache "index.template.html" {:content (markdown "README.md")})

Yields:

      <section id="content">clojure.lang.LazySeq@7f4072bd45d0</section>

It appears sci has no doall.

enlive tranforms dont support reagent style hashmaps

(enlive/at forms 
    [:pre] (enlive/set-attr "style" {:border-radius "8px"
                                     :margin-bottom "32px"})

gives:

bootleg: script error at line 23, column 25: Class cast: clojure.lang.PersistentArrayMap cannot be cast to java.lang.String

hickory conversion bug when inside html tag

$ bootleg -v
Version: 0.1.2

$ cat example-working.clj
(-> (mustache "example-working.html" {:heading "heading"})
    (convert-to :hickory-seq))

$ cat example-working.html
<h1>{{ heading }}</h1>

$ bootleg -d example-working.clj
({:type :element, :attrs nil, :tag :h1, :content ["heading"]} "\n")

$ bootleg example-working.clj
<h1>heading</h1>

$ cat example-broken.clj
(-> (mustache "example-broken.html" {:heading "heading"})
    (convert-to :hickory-seq))

$ cat example-broken.html
<html>
  <body>
    <h1>{{ heading }}</h1>
  </body>
</html>

$ bootleg -d example-broken.clj
("\n    ")

$ bootleg example-broken.clj

Conversion doesn't work when returned mustache markup is embedded in an html tag.

Generating XML preserving the tag name case

Hello, guys! May you can help me... I'm trying to use Bootleg 's (selmer ...) fn to generate some XML files where I need to replace some variables... I have a XML template file and it working, except for this: Selmer is changing all tag names to lower-case... (a tag "<Dimension ...>" has been replaced by "<dimension ...>") but I need to preserve the case. Do you know if thats is possible? How can I do?

xml conversion not working in native-image binary

$ bootleg -d -e '(convert-to [:link "foo"] :xml)'
bootleg: script error at line , column : Factory configuration error: Provider com.sun.xml.internal.stream.XMLOutputFactoryImpl not found
$ lein run -- -d -e '(convert-to [:link "foo"] :xml)'
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><link>foo</link>"

Another reflection error?

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.