When an argument to `raco pkg update` is a package source,
use it to place the currently installed package.
Also, make the set of available command-line arguments more
consistent, especially for `raco pkg install` and `raco pkg update`.
Finally, fix the `--update-deps` flag, including checking
the dependencies of each updated packages based on then update,
instead of the pre-updated package.
Document and adjust `hash-clear!', `hash-clear', and `hash-empty?'.
Also, add `hash-copy-clear'.
The clear operations are constant-time for a non-impersonated
hash table, otherwise they always remove keys one-by-one to
trigger the impersonator's interpositions.
The `hash-clear' operation works only on immutable hash tables,
in contrast to the original implementation. The new `hash-copy-clear'
works on both immutable and mutable hash tables. The "copy"
in its name is meant to suggest a difference with `hash-clear',
even on immutable hash tables: any chaperone on the input
is not on the outpue.
Change `set-clear' to be like `hash-clear', and add
`set-copy-clear'.
(Changes are in consultation with Carl.)
Otherwise, imagine uninstalling packages without `--auto', using `raco
pkg show' to confirm that none are left, and be surprised by a later
error about installed packages.
Pre 6.0, the teachpacks were found using collection-path, but that doesn't
work anymore. Pre this commit, they were found by using
(collection-file-path "image.rkt" "teachpack" "htdp")
and
(collection-file-path "image.rkt" "teachpack" "2htdp")
and then looking for files in the same directory. This worked, but is
a total hack.
This commit changes to an info.rkt-based setup, but the changes ended up
percolating around the teachpack & teaching languages implementation more
than I would have liked (specifically because the internal
datastructure for a teachpack references was an sexp of the form:
`(lib ,(? string-without-slashes?) ...)
but now teachpack references can be arbitrary results of
path->module-path, which never seems to be the above (instead using
the slash-based `lib' module paths)).
So a bunch of places in the teaching langauges code changed to
recognize the right slashes for the teachpacks that have always been
there to preseve the DrRacket API and fall back to just showing the
module path otherwise. There may be places I've missed, tho, that
are expecting the simple lib form and may now be surprised.
On the upside, 3rd parties (via new packages) can now add things
to the teachpack menu item. On the downside (beyond the likely
bugs I've just introduced in this commit), we're supposed to be
getting rid of this dialog, not making it more extensible.
When an existing entry in the AVL tree for an immutable hash
is replaced with a new one, the new one did not always get
the right depth, which could throw off the tree balance.
When a client sends a query to a package catalog, it includes a
version number in the query, and a package catalog can customize its
response to the version. That approach allows evoluation of the way
that versions are mapped to results, but it does not allow a
directory-implemented catalog to offer version-specific information.
Allowing both the server and the client to filter on the version is
even more flexible, and in particular allows a directory-implemented
catalog to include version-specific mappings.
These terms are now documented with define-generics rather than gen:set, and the
terms are "implemented generic method" and "supported generic method" rather
than the over-general "implements" and "supports".
The exn:fail:support exception is used to signal "unsupported" values for
generic methods, e.g. a vector as argument to dict-remove. Right interface,
just the wrong kind of instance. The exception type helps define the notion of
a "supported" method, since a method might have a fallback implementation yet
some values are not considered "supported".
- classify methods into 3 categories:
- no fallbacks
- fallbacks that require an "implementation" of another method,
ie not another fallback
- fallbacks that require "support" of another method
--- can be another fallback
that are in the same directory as the image teachpack (for
htdp and htdp/2e)
closes PR 13967
This isn't the best solution: it would be better if I could
get the directory containing any collection whose name is
teachpack/htdp, but that doesn't seem easy with the current
set of functions
also, bring down below 102 columns
The only error that I see now is due to "collects" which doesn't exist.
I've left it in since it looks like it was added explicitly for some
reason in 5504627.
They need to be encoded in the same way that strings are
encoded. (Report and fixed by Phil Roberts.)
Also added a FIXME about leftover occurrences of \U in the output.
Closes PR 13966.
but this also means that multi-column cells can
refer to variables in the column header (ditto
for multi-row cells)
the code duplication can be fixed with a little
more smarts at the match level, I believe
(see comment in source)
Loading "info.rkt" files always from source turns out to be
expensive (adding 1 second or so on my machine to the startup
time for `raco setup'). Change bootstrap mode to try the compiled
form and fall back to source if its doesn't work.
Separate state and functions, and convert a key loop to functional
style. As it turns out, this has no significant effect on performance,
but it looks a lot better to me.