guitarvydas / 0D

component-based software using drawings as source code
4 stars 0 forks source link

Install Error: Error 2 #1

Open RAbraham opened 4 months ago

RAbraham commented 4 months ago
git checkout devpy
cd python/test 
make install

Error

./makedas2json.bash ../../das2json/

making das2json

/Users/rabraham/Documents/paul/0D/das2json
odin build . -debug -o:none
/Users/rabraham/Documents/paul/0D/das2json/syntax/drawio_mxgraph.odin(140:24) Error: Undeclared name: incl
    case "vertex": incl(&cell.flags, Flag_Value.Vertex)
                   ^~~^
/Users/rabraham/Documents/paul/0D/das2json/syntax/drawio_mxgraph.odin(142:13) Error: Undeclared name: incl
    incl(&cell.flags, Flag_Value.Edge)
    ^~~^
/Users/rabraham/Documents/paul/0D/das2json/syntax/drawio_mxgraph.odin(151:35) Error: Undeclared name: incl
    case "container": incl(&cell.flags, Flag_Value.Container)
                      ^~~^
make[1]: *** [das2json] Error 1
make: *** [install] Error 2
guitarvydas commented 4 months ago

workaround while I look into this: skip the make install step and just run make dev0

I.e.

git checkout devpy
cd python/test 
make install

The .json files should already be there and you shouldn't need make install. To check that the .json files are there:

> ls *.json
helloworld0d.drawio.json    simple0d.drawio.json        simple0d2.drawio.json       transpile.drawio.json       vsh0d.drawio.json
RAbraham commented 4 months ago
➜  test git:(devpy) ✗ pwd
/Users/rabraham/Documents/dev/paul/0D/python/test
➜  test git:(devpy) ✗ make dev0
# *** building jsons
make: ../../das2json//das2json: No such file or directory
make: *** [jsons] Error 1
➜  test git:(devpy) ✗ ls *.json
arith0d.drawio.json      simple0d2.drawio.json    transpile.drawio.json
helloworld0d.drawio.json simple0d3.drawio.json    vsh0d.drawio.json
simple0d.drawio.json     simple0d4.drawio.json
➜  das2json git:(devpy) ✗ pwd
/Users/rabraham/Documents/dev/paul/0D/das2json
➜  das2json git:(devpy) ✗ ls
Makefile            das2json.dSYM       examples            syntax
README.md           example.drawio.json main.odin

Is das2json.dSYM the right name?

guitarvydas commented 4 months ago

pull and try again git checkout devpy cd python/test make install

(incl was recently removed from the Odin language, I updated drawio_mxgraph.odin to reflect this change)

RAbraham commented 4 months ago

this worked. thanks

On Thu, Mar 28, 2024 at 7:08 AM Paul Tarvydas @.***> wrote:

pull and try again git checkout devpy cd python/test make install

(incl was recently removed from the Odin language, I updated drawio_mxgraph.odin to reflect this change)

— Reply to this email directly, view it on GitHub https://github.com/guitarvydas/0D/issues/1#issuecomment-2024928588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUJLPZYYXK5NTGQLU5OYLY2P23HAVCNFSM6AAAAABFL4M2FOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUHEZDQNJYHA . You are receiving this because you authored the thread.Message ID: @.***>

-- Take care, Rajiv

RAbraham commented 4 months ago

I now see this. Is this the expected output?

➜  test git:(devpy) ✗ make
clear

make clean
rm -f _.py
make dev0
# *** building jsons
# *** building _.py
python3 _.py "@0" main simple0d.drawio.json

--- Hierarchy ---
(main
  (main.Echo₀))

--- connections ---
*** possible connections for main:
down ❲main❳.“” -> ❲main.Echo₀❳.“”
up ❲main.Echo₀❳.“” -> ❲main❳.“”
up ❲main.Echo₀❳.“✗” -> ❲main❳.“✗”

*** possible connections for main.Echo₀:

--- Outputs ---
⟪“”₋“@0”₋…⟫
print_routing_trace NIY
--- done ---
RAbraham commented 4 months ago

Also is this what you also see for dev0d4?

➜  test git:(devpy) ✗ make dev0d4                           
# *** building jsons
# *** building _.py
python3 _.py "@0d4" main simple0d4.drawio.json

*** Error: ***
main: message '' from main dropped on floor...
*** possible connections for main:
down ❲main❳.“a” -> ❲main.Echo Envelope❳.“k”
up ❲main.Echo Envelope❳.“” -> ❲main❳.“”
up ❲main.Echo Envelope❳.“✗” -> ❲main❳.“✗”
print_routing_trace NIY
***

--- Hierarchy ---
(main
  (main.Echo Envelope
    (main.Echo Envelope.Echo₀)))

--- connections ---
*** possible connections for main:
down ❲main❳.“a” -> ❲main.Echo Envelope❳.“k”
up ❲main.Echo Envelope❳.“” -> ❲main❳.“”
up ❲main.Echo Envelope❳.“✗” -> ❲main❳.“✗”

*** possible connections for main.Echo Envelope:
down ❲main.Echo Envelope❳.“k” -> ❲main.Echo Envelope.Echo₀❳.“b”
up ❲main.Echo Envelope.Echo₀❳.“” -> ❲main.Echo Envelope❳.“”
up ❲main.Echo Envelope.Echo₀❳.“✗” -> ❲main.Echo Envelope❳.“✗”

--- Outputs ---
print_routing_trace NIY
--- done ---
guitarvydas commented 4 months ago

at this moment, with the latest push, I've only seen dev0 do anything. I expect to see this:

make clean
rm -f _.py
make dev0
# *** building jsons
# *** building _.py
python3 _.py "@0" main simple0d.drawio.json

--- Hierarchy ---
(main
  (main.Echo₀))

--- connections ---
*** possible connections for main:
down ❲main❳.“” -> ❲main.Echo₀❳.“”
up ❲main.Echo₀❳.“” -> ❲main❳.“”
up ❲main.Echo₀❳.“✗” -> ❲main❳.“✗”

*** possible connections for main.Echo₀:

--- Outputs ---
⟪“”₋“@0”₋…⟫
--- routing traces ---

⟹  main.❲❳
  ↓ main.❲❳ ➔ main.Echo₀.❲❳
    ⋯ main.Echo₀.❲❳ ∴ main.Echo₀.❲❳
      ↑ main.Echo₀.❲❳ ➔ main.❲❳
--- done ---

commit c9669... The biggest change is that "routing traces" appears to be working and producing a reasonable trace. I have yet to try this latest version with the other devNs, esp. dev0d4. The point of implementing routing traces was to help debug dev0d4, but, one might expect new problems in dev1...3, before trying dev0d4 again - I have yet to check.

guitarvydas commented 4 months ago

In general, when things are working correctly, "dropped on floor" means either (1) the diagram editor didn't connect an arrow to a port (often happens with draw.io, but, I usually get rid of this kind of problem early), or, (2) gates (rhombuses) have the wrong names, or, (3) code calls "send()" and specifies a non-existent port. In debugging routing_traces, I played with the names of ports to make them easier to manually track. I changed the port names back to their original names (often ""), but may have missed a few. In general, you want to be able to ignore some outputs to allow for easier abstraction, but, I disallow this kind of thing during debugging of the bootstrap to help me catch niggly problems. Most test cases are currently small and don't require much abstraction - yet.