hodur-org / hodur-visualizer-schema

Hodur is a domain modeling approach and collection of libraries to Clojure. By using Hodur you can define your domain model as data, parse and validate it, and then either consume your model via an API or use one of the many plugins to help you achieve mechanical results faster and in a purely functional manner.
MIT License
21 stars 7 forks source link

Cant get basic vizualizer to work #13

Open olymk2 opened 3 years ago

olymk2 commented 3 years ago

I have created a new project but when I jack in I can require visualizer but none of the functions are available I get.

No such var: visualizer/schema

This is the code which is mainly from the readme, I have downgraded hodour as well from one of the issues bit this did not help.


(ns my-design.core
  (:require [hodur-engine.core :as hodur]
            [hodur-visualizer-schema.core :as visualizer]))

(def meta-db (hodur/init-schema
              '[Person
                [^String first-name
                 ^String last-name]]))

(-> meta-db
    visualizer/schema
    visualizer/apply-diagram!)

Is it just me doing something silly or does this no longer work ?

olymk2 commented 3 years ago

okay just for my own reference, i name the file clj which then cant access visualizer.

This works not specifying hodur core make visualizer use hodur/engine/0.1.2/engine-0.1.2.pom which works.

{:deps {
        hodur/visualizer-schema {:mvn/version "0.1.1"}}
 :paths ["src" "resources" "target"]}

vs


{:deps {
        hodur/engine {:mvn/version "0.1.8"}
        hodur/visualizer-schema {:mvn/version "0.1.1"}}
 :paths ["src" "resources" "target"]}

Part of the issue is by default main-dev.js is used in the tooling, but the newer hodour is outputting main.js so the default index.html in figwheel or clj cant find the JS.

there may be other issues but that seems to be the main one.

mbolmstrand commented 8 months ago

Thanks for this @olymk2! it made things work for me as well.