@@ -19,6 +19,10 @@ RUN git clone https://github.com/factor/factor.git && \
1919 git checkout ${FACTOR_COMMIT}
2020WORKDIR /opt/factor
2121
22+ # Patch extra/shuffle to drop the dependency on help / help.markup (for $shuffle docs)
23+ COPY patches/shuffle-drop-help.patch /tmp/shuffle-drop-help.patch
24+ RUN git apply /tmp/shuffle-drop-help.patch
25+
2226# Bootstrap a headless image: drop the GUI (ui, ui.tools), the in-image help
2327# system (help, handbook), and the dev-tools component (tools) from the bootstrap
2428# component set.
@@ -29,14 +33,22 @@ RUN sed -i 's#-i="\$BOOT_IMAGE"#-i="$BOOT_IMAGE" -exclude="'"${FACTOR_EXCLUDE}"'
2933RUN ./build.sh net-bootstrap
3034
3135# Precompile tools.test AND the common exercise vocabs into factor.image, then re-save it.
32- RUN ./factor -e='USING: accessors arrays ascii assocs bit-arrays calendar calendar.english combinators combinators.short-circuit command-line concurrency.combinators concurrency.locks continuations debugger deques destructors disjoint-sets dlists formatting fry generic grouping hash-sets hashtables heaps io io.encodings.utf8 io.files io.streams.string kernel lexer locals macros make math math.bitwise math.combinatorics math.constants math.functions math.order math.parser math.primes math.statistics namespaces prettyprint.config quotations random random.mersenne-twister ranges regexp sequences sets sorting source-files.errors.debugger splitting splitting.monotonic strings system tools.test tr typed unicode vectors vocabs vocabs.loader memory ; save'
36+ RUN ./factor -e='USING: accessors arrays ascii assocs bit-arrays calendar calendar.english circular combinators combinators.short-circuit command-line concurrency.combinators concurrency.locks continuations debugger deques destructors disjoint-sets dlists formatting fry generic grouping hash-sets hashtables heaps infix io io.encodings.utf8 io.files io.streams.string kernel lexer locals macros make math math.bitwise math.combinatorics math.constants math.functions math.order math.parser math.primes math.statistics namespaces pair-rocket prettyprint.config quotations qw random random.mersenne-twister ranges regexp sequences sequences.repeating sets sorting source-files.errors.debugger splitting splitting.monotonic strings system tools.test tr typed unicode vectors vocabs vocabs.loader memory ; save'
3337
3438# Remove files not needed at runtime
3539RUN rm -rf .git build vm src misc Factor.app \
3640 factor.image.fresh boot.*.image libfactor.a libfactor-ffi-test.so \
37- extra GNUmakefile Nmakefile LICENSE.txt README.md \
41+ GNUmakefile Nmakefile LICENSE.txt README.md \
3842 build.sh build.cmd unmaintained
3943
44+ # Keep only the extra/ source that sequences.extras needs to compile on demand:
45+ # itself plus extra/assocs.extras and extra/shuffle.
46+ RUN find extra -mindepth 1 -maxdepth 1 \
47+ ! -name sequences ! -name assocs ! -name shuffle \
48+ -exec rm -rf {} + && \
49+ find extra/sequences -mindepth 1 -maxdepth 1 ! -name extras -exec rm -rf {} + && \
50+ find extra/assocs -mindepth 1 -maxdepth 1 ! -name extras -exec rm -rf {} +
51+
4052# Prune basis subdirs that exercism tests cannot reach, one category per rm so
4153# each vocab is named exactly once. Source files only — any bytecode already in
4254# factor.image is unaffected. A few pruned vocabs (bit-arrays, disjoint-sets,
@@ -79,8 +91,8 @@ RUN cd basis && rm -rf \
7991 base16 base24 base32 base36 base45 base58 base62 base64 base85 base91 \
8092 base92 checksums compression crypto hex-strings
8193
82- # Specialised data structures (bit-arrays, disjoint-sets, heaps, dlists are
83- # precompiled above, so pruning their source here is safe)
94+ # Specialised data structures (bit-arrays, disjoint-sets, heaps, dlists, circular
95+ # are precompiled above, so pruning their source here is safe)
8496RUN cd basis && rm -rf \
8597 biassocs bit-arrays bit-sets bit-vectors bitstreams bloom-filters boxes \
8698 circular columns cuckoo-filters disjoint-sets dlists heaps interval-maps \
0 commit comments