On 6/6/21, Don Green <infodeve...@gmail.com> wrote:
>
> Can a new user defined pkg encompass nothing more than references to
> previously defined pkgs so that every user created module references a
> single user defined pkg?
Yes. You can make a new package whose main.rkt provides lots of
identifiers from other packages.
A package is not something that you refer to directly in your Racket programs. Instead, a package is a set of libraries that fit into the collection hierarchy, and you refer to libraries through their collection-based paths. Libraries that are close in the hierarchy may be provided by different packages, while a single package may provide libraries that are far from each other in the hierarchy (but that are conceptually related, somehow).
Racket documentation tells you which package provides a given library. For example, the documentation for the pict/face library says that it is provided by the pict-lib package.If you’re reading this in a web browser, click pict/face to go straight to its documentation.
Over time, packages may be refactored so that a library moves to a different package, but the original package should continue to provide the library, too, by declaring a dependency on the new package. More generally, a package is intended to have an interface that only grows in terms of libraries, bindings, and functionality, which provides a basic level of backward compatibility. Incompatible changes should be implemented in a new package.
Following from Philip's 3rd point, which I think is very relevant, I surmise that I really should:
1) build libraries ;that reference my code (These libraries are built within a user-defined package.)
2) Then my initial question, refined, becomes:
Can a new user defined library encompass nothing more than references to previous user defined libraries? (I think the answer is: yes).
3) Since the library is said to be referenced through their collection-based paths this leads me to wonder:
Am I expected to create my own pathed-collection that gives my code independence from the default installled racket pathed-collections?
Then am I to use: (current-library-collection-links paths) to link my collection into the racket system?