Giter Site home page Giter Site logo

Comments (20)

jnavila avatar jnavila commented on June 24, 2024 1

Probably a bot trying to go through the anti-spam filters.

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

I haven't tested, but did you try to change current directory at the project level?

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

I haven't tested it too. I use to run things from the repo's root.
But checking here and it works, thanks for the suggestion.

What do you think about adding a flag to pass the project inside of the repo? Is it possible?
I would like to propose improvements here with a PR but I cannot read OCaml yet.

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

This is also doable. I'll look into providing it...

Thank you for keeping me busy 😉

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

:) It is my pleasure haha.

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

Testing this new relative path here.
I found a small issue, maybe related to the symlinks

This is my folder/repo structure

➜ tree -L 1
.
├── kicad-library (my custom parts)
├── my-board
│   └── library (symlink to ../kicad-library)
├── my-board2
│   └── library (symlink to ../kicad-library)
└── README.md
➜ plotgitsch -r ./my-board -l my-board/board-cache.lib
plotgitsch: internal error, uncaught exception:
            (Sys_error
              "././my-board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library: Too many levels of symbolic links")
            Raised by primitive operation at file "plotkicadsch/src/trueFs.ml", line 40, characters 21-39
            Called from file "plotkicadsch/src/trueFs.ml", line 50, characters 6-19
            Called from file "plotkicadsch/src/kicadDiff.ml", line 122, characters 20-42
            Called from file "cmdliner_term.ml", line 25, characters 19-24
            Called from file "cmdliner.ml", line 117, characters 32-39

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

This is a second repo, with the files all in the root path.


But I am trying the relative path anyways. I am not sure if I am doing it right but I think it should work.

➜ plotgitsch -m -r ./ -l board-cache.lib HEAD~1 HEAD~3
Use compare (ImageMagick) between bitmaps between Git rev HEAD~1 and Git rev HEAD~3
Exception GitFs.PathNotFound(0)

This is my current workaround to go inside the folder, it works. Because ti is going inside ./ in other words, doing nothing.

assoc-board on main [?] 
➜ plotgitsch-dir -d . -m -l ./board-cache.lib fcd81ef 0f299ec
plotgitsch -l ./board-cache.lib -m fcd81ef 0f299ec
Use compare (ImageMagick) between bitmaps between Git rev fcd81ef and Git rev 0f299ec
Exporting...
sch1-board.svg (66a393)
sch2-board.svg (be7177)

This is using the new -r flag, but setting it to the current directory.
Perhaps it was not designed wit this in minde this since it is not needed in this case.
But I believe it should work with "./" too.

assoc-board on main [?] 
➜ plotgitsch -r . -m -l ./board-cache.lib fcd81ef 0f299ec 
Use compare (ImageMagick) between bitmaps between Git rev fcd81ef and Git rev 0f299ec
Exception GitFs.PathNotFound(0)

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

This test is using the nested project from my first reply.

# Here I just replace the symlinked library with the real one
➜ mv ./my-board/library ./my-board/library.old.symlink
➜ cp -r ./kicad-library ./my-board/library

# Testing again. It doesn't find a path, not sure which one. Maybe because the real library was not found in the previows versions of the git history.
➜ plotgitsch -r ./my-board -l my-board/board-cache.lib HEAD HEAD~3
Use compare (ImageMagick) between bitmaps between Git rev HEAD~2 and Git rev HEAD~3
Exception GitFs.PathNotFound(0)

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

plotgitsch: internal error, uncaught exception:
(Sys_error
"././my-board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library/board/library: Too many levels of symbolic links")

This is a sign that your repository is recursing on itself. Unfortunately, my code is blind to this kind or recursion and chokes. If you try ls -lR, do you experience the same kind of issue?

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

This is a second repo, with the files all in the root path.

But I am trying the relative path anyways. I am not sure if I am doing it right but I think it should work.

Ah, you got me. The code does not handle this form of relative path (without real subdir, and with ./ in it), only plain 'subdir1/subdir2'.

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

This test is using the nested project from my first reply.

# Here I just replace the symlinked library with the real one
➜ mv ./my-board/library ./my-board/library.old.symlink
➜ cp -r ./kicad-library ./my-board/library

# Testing again. It doesn't find a path, not sure which one. Maybe because the real library was not found in the previows versions of the git history.
➜ plotgitsch -r ./my-board -l my-board/board-cache.lib HEAD HEAD~3
Use compare (ImageMagick) between bitmaps between Git rev HEAD~2 and Git rev HEAD~3
Exception GitFs.PathNotFound(0)

try plotgitsch -r my-board -l my-board/board-cache.lib HEAD HEAD~3

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

I have to clean up the relative path a bit before consumption.

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

The library inside each kicad project is a symlink. It refers to a folder inside the root (one level up)

library -> ../kicad-library

The recursion is being generated inside plotgitsh. Maybe something inside does not handle well symlinks.

Inside the project folder
image

Inside the repo root
image

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

Oh, sorry for the mistake. 2 files were not properly updated during the git pull.
It works.

plotgitsch -m -r my-board -l my-board/board-cache.lib HEAD HEAD~3
use compare (ImageMagick) between bitmaps between Git rev HEAD and Git rev HEAD~3
Exporting...
sch1-board.svg (0dce0a)
sch2-board.svg (42b010)

from plotkicadsch.

jnavila avatar jnavila commented on June 24, 2024

Can I close the issue then?

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

Sure. I kept open since you said something about managing the -r . case. I will let you decide then, cool?

from plotkicadsch.

Javidgg avatar Javidgg commented on June 24, 2024

I have to clean up the relative path a bit before consumption.

from plotkicadsch.

Javidgg avatar Javidgg commented on June 24, 2024

The library inside each kicad project is a symlink. It refers to a folder inside the root (one level up)

library -> ../kicad-library

The recursion is being generated inside plotgitsh. Maybe something inside does not handle well symlinks.

Inside the project folder
image

Inside the repo root
image

from plotkicadsch.

Javidgg avatar Javidgg commented on June 24, 2024

The library inside each kicad project is a symlink. It refers to a folder inside the root (one level up)

library -> ../kicad-library

The recursion is being generated inside plotgitsh. Maybe something inside does not handle well symlinks.

Inside the project folder
image

Inside the repo root
image

from plotkicadsch.

leoheck avatar leoheck commented on June 24, 2024

What is this? What is happening here?

from plotkicadsch.

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.