logisim-evolution/logisim-evolution

Two loaded libraries can't share components from a third library

Open

#1,809 opened on Jul 31, 2023

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Java (505 forks)batch import
bugdocumentationhelp wantedpri std

Repository metrics

Stars
 (3,695 stars)
PR merge metrics
 (Avg merge 3d 18h) (47 merged PRs in 30d)

Description

This bug is a bit complicated to explain.

Suppose I have three libraries I created, LibA.circ and LibB.circ. LibA and LibB are standard circuits, while LibC contains some custom components. LibA and LibB each use some of the components in LibC.

Now suppose I want to create a master circuit that uses circuits from the LibA and LibB libraries.

When I load the LibA library, it loads with no problem. But when I attempt to load the LibB library, I get an error message complaining about any LibC components shared between LibA and LibC.

Apparently Logisim-Evolution doesn't allow adding two user libraries that share components from a third user library.

The same thing happens if I load LibB first, followed by LibA.

Note that L-E doesn't complain if the LibA and LibB libraries share components from L-E's built-in libraries.

But I can't figure out why this should be a problem. The shared LibC components are the same in LibA and LibB, so there's only one set of LibC components. So what's the problem?

My workaround was painful. I had to create empty circuits in my master circuit that matched every circuit in my LibA and LibB libraries, then copy/paste each of those circuits from LibA and LibB into the corresponding circuit in the master circuit. Now everything worked as expected; the new circuits could use components from LibC without any problem.

Of course, this has one significant side effect: the master circuit file now contained all of the circuits from the LibA and LibB libraries, so I could no longer manage the LibA and LibB circuits as their own files. Not how I wanted to manage my circuits, especially ones with many subcircuits.

I don't think what I'm trying to do here is unusual, especially with complex projects that contain multiple levels of circuits, each with their own components and subcircuits.

Contributor guide