delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=gmail.com; s=20161025; | |
h=mime-version:references:in-reply-to:from:date:message-id:subject:to; | |
bh=OAEkiI/qrFoh17oahHl3yrkhcqs4UJApkFwczUOtbMA=; | |
b=YKWYWxZbZXBijf5FBwZ7m2nB6dRlUk4MGXv4poycDiu6xPTYwYelqAR3Mgc8aCId3N | |
f+NPjnjobU+eyDRAAtGxcQz8QT1wmUsCIqrvLJqG+El4O1FBZ+Kspyl3kJLVxcKmb7WD | |
QKI/SpaRO1wFFEBRyqaBMEz1tsXRVmdKBRwvWSReFEvtx86rmrCQXr4nfra91qqrx27+ | |
7SUzhj8u4IVJyll/HJJUHhNyuP7AZH098OreZhWPJSn9AafxU+Yc1W2IVNugQ7smZ1Jd | |
aWYgwA2fyl0DDrNFki3g/PtU9Cggdj+OOCq9PPNkvViwxZhdjMJ4O9arQ2l995OHcYFd | |
w9tA== | |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20161025; | |
h=x-gm-message-state:mime-version:references:in-reply-to:from:date | |
:message-id:subject:to; | |
bh=OAEkiI/qrFoh17oahHl3yrkhcqs4UJApkFwczUOtbMA=; | |
b=nCvvYtKY4TjOEgItdLvaO7IOxwlRPzc0YDvGThP9aag+BpvLsM/REm+KxD0vLQBgNU | |
ZwUq4sjSOUCA2w3zJLNilghwrl3rwl+l+12DnarkwwVgcO6aKGrljD4oKbtppIMN7Fxm | |
OdCu/tNCrJkobd/0xp/mceFL7pUtRTg8zNrx5jWb6RJ9DJQ5x1UT+FIYv8ClEcLD/G7V | |
025QDhq2saRoPrfKQXU6YrenW56C7t8M4l9I2qX70VrtMw4kVbOVS2SpgBSYcg5n2jIN | |
Vi3eThIKYr7r7PRV+3tnv5vmXtuQPjKESHRBS5uZZncpp9kkGBzJMxwl4gIV7GzPIKSQ | |
r1Dw== | |
X-Gm-Message-State: | APjAAAV5IDX/tTdUJQyQkDL5O5SQ5e82sXfdKRB4bg4m3nk+xm9oalz3 |
0MF2QlNObAmUvwvDXR1U9voNsEPtLEgJW0otILa1zS10 | |
X-Google-Smtp-Source: | APXvYqzXaUoIlgj76ypxQTgoEJk9uDeeJkBSNyiH+jJMkoS6ZVMLF5Hsa4wNrSPjGeYHa9GNaj80i2sNDO6RnidK71I= |
X-Received: | by 2002:a81:5216:: with SMTP id g22mr22727247ywb.30.1582179438563; |
Wed, 19 Feb 2020 22:17:18 -0800 (PST) | |
MIME-Version: | 1.0 |
References: | <alpine DOT DEB DOT 2 DOT 20 DOT 2002181340190 DOT 1436 AT nimbus> |
In-Reply-To: | <alpine.DEB.2.20.2002181340190.1436@nimbus> |
From: | "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
Date: | Wed, 19 Feb 2020 21:17:07 -0900 |
Message-ID: | <CAC4O8c-o56yZuAR-kPF_9x+zswD3asBD2JpCo-fBAQphQARrPQ@mail.gmail.com> |
Subject: | Re: [geda-user] Proposal: Library handling |
To: | geda-user AT delorie DOT com |
Reply-To: | geda-user AT delorie DOT com |
On Wed, Feb 19, 2020 at 6:45 AM Roland Lutz <rlutz AT hedmen DOT org> wrote: > > Hi, > > I have some ideas about improving library handling in gEDA/gaf which I'd > like to put up for discussion here. > > > > Proposal 1: Named libraries > =========================== > > A symbol is currently referenced by its basename, e.g. "resistor-1.sym". > When gEDA looks for a symbol, it searches all library directories for a > file with that name, and uses the first one it finds. > > I suggest referencing symbols by two strings: the basename, and a library > identifier. Using the basename (instead of e.g. a full path) allows > library authors to revise the internal organization of the library. > Using a library identifier (instead of e.g. a library path) allows the > user to reorganize the libraries on their machine and facilitates sharing > schematic files between users. > > When a library is added, a library identifier would be specified, e.g.: > > (add-library "kmk-essentials" "~/geda/kmk-essentials") > > Some library identifiers are reserved for special purposes: > > unknown > This is the internal identifier used whenever a symbol is referenced > by an old file which doesn't specify a library identifier. This means > the old symbol lookup logic is to be used. > > default > This is the identifier for the historic default library. > > local > This identifier is reserved for project-local libraries specified in > the project's configuration file. The user interface may offer > dedicated controls to manipulate project-local libraries. > > > > Proposal 2: Library section > =========================== > > Currently, symbols are referenced from the schematic file like this: > > C 5000 2000 1 0 0 resistor-1.sym > > For embedded symbols, a section containing the symbol contents follows: > > C 5000 2000 1 0 0 EMBEDDEDresistor-1.sym > [ > L 5600 2200 5500 2000 3 0 0 0 -1 -1 > L 5500 2000 5400 2200 3 0 0 0 -1 -1 > ...and so on... > ] > > This is repeated every time the embedded symbol is used. > > I propose adding special syntax to the file format which allows embedding > a symbol once and then referencing it, e.g.: > > s resistor-1 1 default resistor-1.sym > [ > L 600 200 500 0 3 0 0 0 -1 -1 > L 500 0 400 200 3 0 0 0 -1 -1 > ...and so on... > ] > > From there on, whenever the symbol "resistor-1" is referenced, this means > the symbol file "resistor-1.sym" from the default library, whose contents > are included for convenience. The distinction between basename and symbol > identifier is made so multiple symbols with the same basename can be used; > in that case, gEDA would assign a different identifier to each symbol, > e.g. "resistor-1<1>". > > There are three modes of embedding a symbol: > > omit (0) > The symbol's contents are omitted, i.e., it isn't embedded at all. > This is useful for minimizing changes when using an SCM. > > reference (1) > The symbol's contents are included, but the file in the library is > authoritative. This is useful for distributing schematic files to other > users, and for detecting symbol changes. The UI would display a > warning if the library is missing or the symbol in the library differs > from the one included in the schematic but require a user interaction > before updating the symbol in the schematic. > > embed (2) > The symbol embedded in the schematic is authoritative; its basename is > included for reference but otherwise ignored. This is useful for > including custom one-off symbols without having to bother with > external files. > > > > Any thoughts or comments? I'm unlikely to change from my practice of copy into/symlink from project dir, but so long as it doesn't break that I don't object. Britton
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |