Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Error: Error 2 #1

Open
RAbraham opened this issue Mar 28, 2024 · 8 comments
Open

Install Error: Error 2 #1

RAbraham opened this issue Mar 28, 2024 · 8 comments

Comments

@RAbraham
Copy link

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
Copy link
Owner

guitarvydas commented Mar 28, 2024

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
Copy link
Author

RAbraham commented Mar 28, 2024

➜  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
Copy link
Owner

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
Copy link
Author

RAbraham commented Mar 29, 2024 via email

@RAbraham
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants