1
1
mirror of https://github.com/mgree/ffs.git synced 2024-09-11 19:17:40 +03:00
Commit Graph

43 Commits

Author SHA1 Message Date
Dan Liu
3857d74d27
pack/unpack (#65)
* scoping out multi-binary stuff

* todo notes for pack/unpack [ci skip]

* new version of r in gh action

* created lib.rs and moved ffs main.rs bin. added bfs traversal of json structure.

* moved main.rs last commit. forgot to commit the removal

* added file creation for null,bool,num,str

* main.rs > ffs.rs to have ffs as executable

* error condition for already existing root dir and text files

* first cut at BFS with nodes

* unpack supports all 3 types now

* use config object for file name parsing, change from_args to from_ffs_args in ffs.rs

* fixed unpack configs

* added from_pack_args and some code to get the Value structure from a file

* added dep walkdir

* not working pack.rs

* remove dep walkdir

* almost working pack.rs

* pack works, but not too efficient

* change pack to return name and value so recursion can work without queue

* pack.rs similar to as_other_value now and works

* unpack and pack now have their own args parsers

* changed cli options for pack-unpack (unfinished)

* edited config to better support pack and unpack actions

* fixed unpacking into empty dir. only unpacking into unempty dir errors

* checked almost all error statuses

* fix no-xattr option for unpack

* prevent non-object/array from being unpacked

* fixed missing RUST_LOG warnings

* roundtrip tests for formats. since comments and formatting aren't preserved, unpack and pack twice

* fix pack: added --exact

* rm ERR_MSG tmp file in all tests. added all possible format conversion tests. edit to run_tests.sh to support new tests

* fix packunpack tests

* another update to test scripts

* unpack: don't remove dir if value is not map or list. pack: detect file type without xattr. started adapting more scripts to use unpack/pack

* changed user.type xattr for non-lists from 'map' to 'named'. converted 10 scripts

* added more scripts. fixed bug in infer_mount_relative fail()

* more tests, fix: original_name xattr only gets used if name is invalid

* more tests, missing 1 fail message in yaml_output test, changed pack list sorting to use file name instead of parsed integers to match ffs

* fixed tests for unpack/pack

* edit script formatting using quotes around vars, rm readonly for unpack

* pack: added back ignored file for lists and --no-xattr option in cli, added macos_noxattr_cleanup (not exactly the same as ffs test)

* Run `pack/`unpack` in macOS CI; factor out benchmarks (#63)

* added quiet inplace, umask test based on mode.sh

* added fail (un)pack for every call, fix missing n in fail msg for basic_object_exact

* fixed issues with adding fail conditions

* added (un)pack exit status tests

* added symlink support for pack

* symlinks mostly done. cleanup + efficiency checks needed

* added test for packing symlinks, added some comments for pack

* fix test4 for symlink test on linux

* see why test5 not working on linux

* actually print out the xattr

* fix: setting xattr on symlink doesn't work in linux :( making it macOS-specific

* impl --max-depth and --allow-symlink-escape. tests needed

* fix: macos links /var to /private/var so checking if symlinked path starts with mount errors. canonicalizing mount works.

* fix: wrong detected type map instead of named. add: symlink escape and maxdepth test.

* code cleanup, added test for symlink escape and maxdepth together, show warnings in config for pack/unpack not just errors

* simple changes for requests:
pack:122 add loop to error msg
debug! for received config in unpack & pack
f.write(s)? instead of write!
shadowed original_name
verb agreement in cli.rs
remove reserve for BTreeMap and now useless TODOs

* while let instead of queue.empty

* use auto instead of detect and check for auto and is_dir to resolve directory type
use .as_ref instead of .clone for accessing mount
remove non-symlinks from mapping

* resolve directory type always. warn for unknown path_type.

* warn when hitting broken symlinks.

* better warn message for broken symlink

* resolve repeated traversal of broken symlinks
store bool of whether link is broken in symlink mapping
checks symlinks a maximum of two times for broken links

* use struct instead of tuple in symlink map
for better naming and code clarity

* loosen criterion for determining directory type
directories get resolved as list if all files begin with an integer.
if a directory's user.type gets forcibly set to list without obeying
that property, all filenames that don't begin with an integer get put
to the end of the list, but are still sorted alphabetically.

* don't use regex to detect. just check first or first two chars manually.
continue to use regex for sorting because lexicographic sorting for files starting with -
means larger negative numbers go to the right

---------

Co-authored-by: Michael Greenberg <michael.greenberg@stevens.edu>
2023-09-27 14:02:15 +00:00
Michael Greenberg
6cabcefb8a new version of r in gh action 2022-12-07 14:46:48 -05:00
Michael Greenberg
ff09d2bbae fixup exit status 2022-08-03 11:30:09 -04:00
Michael Greenberg
bd22f21877 disable macos :( 2022-08-03 11:04:11 -04:00
Michael Greenberg
f9179b1f35 upgrade macos 2022-08-03 10:10:58 -04:00
Michael Greenberg
bdab5791cf or, as i prefer to call it, ubuntu+linux 2022-01-27 13:05:14 -05:00
Michael Greenberg
9a41934e51 switch to macos 10.15 2022-01-27 12:38:20 -05:00
Michael Greenberg
a56a7e5607
Retry R installations (#57)
Network failures were causing spurious CI failures; we now try to install ggplot2 (and its dependencies) up to three times.
2021-11-08 16:21:38 -08:00
Michael Greenberg
b9c6644312
Lazy loading (#50)
Lazy implementation is now the default. Use `--eager` to force ffs to construct the entire filesystem on startup.

NB that lazy loading is not the same as lazy parsing. There's still plenty of savings left on the table.

There is some unwelcome code duplication in saving to accommodate type-level jiggery pokery.
2021-10-01 07:57:58 -07:00
Michael Greenberg
da6811adf6
Add cronjob to GH workflow (#48)
Run every day ~11am. Hopefully I won't have too many lunches ruined by regressions.
2021-09-24 12:40:14 -07:00
Michael Greenberg
66a104671f naming shenanigans 2021-07-29 21:49:12 -04:00
Michael Greenberg
fee24f4166 fixup prerelease paths 2021-07-29 21:20:31 -04:00
Michael Greenberg
4c8f6ddecc missing dependency on prerelease 2021-07-29 20:59:53 -04:00
Michael Greenberg
6ed74ee0c7
Timing support (#46)
Benchmarks, in two flavors: real-world benchmarks and synthetic microbenchmarks.

`--time` flag for benchmarking output on stderr.

Using R to generate pretty graphs. Some overhaul of build scripts and artifacts, with the hope of simplifying the release system.
2021-07-29 17:55:53 -07:00
Michael Greenberg
e9b0f0c5be add attr dep to pre-release build action, so we can pass tests on linux 2021-07-01 22:07:13 -04:00
Michael Greenberg
fad45bed4b
Manage metadata using extended attributes (#30)
Extended attributes in `user.type` track the type of files and directories. Users can update these to alter the metadata.

Loading files records types; serialization tries to use them (but will default to strings or bytes if it can't interpret the file appropriately).

In particular, it's now possible to convert between both kinds of directories (list and named).

This isn't a long term solution, because extended attributes have no real affordances---it's not obvious that they even exist, and even once you see `user.type`, it's obvious what it means or what values it has. #2 has other ideas about ways to represent and manipulate metadata.

All of this comes with a few new flags and some brittle file ignoring behavior (macOS will generate `._*` files to hold extended attributes on filesystems that don't support them). The man page is updated with detail on the data model, and now the manpage is part of the website proper.
2021-07-01 18:52:53 -07:00
Michael Greenberg
96a31269c5 take 3 2021-06-25 15:07:13 -04:00
Michael Greenberg
b5090fdefd take 2 on multi-platform releases 2021-06-25 15:01:25 -04:00
Michael Greenberg
81fcbf5a5e try to save both generated executables 2021-06-25 14:53:09 -04:00
Michael Greenberg
b4d2230519 cleaner path handling 2021-06-25 14:41:17 -04:00
Michael Greenberg
c48ddfa43f figured out why pre-release wasn't triggering: wrong branch name 2021-06-25 14:27:54 -04:00
Michael Greenberg
bcc8221803 rename workflow 2021-06-25 14:13:33 -04:00
Michael Greenberg
cabf2b9cab try number 2 2021-06-24 19:46:57 -04:00
Michael Greenberg
b165218c99 build and release a latest executable 2021-06-24 19:41:46 -04:00
Michael Greenberg
2ec8fa6991 run tests in parallel, collect logs 2021-06-21 21:10:29 -04:00
Michael Greenberg
4d956807f6 amateur hour 2021-06-17 20:22:22 -04:00
Michael Greenberg
bcd260906d cleaner output by default 2021-06-17 20:00:43 -04:00
Michael Greenberg
0b45914f3c clearer output, pause after fsync 2021-06-16 20:04:23 -04:00
Michael Greenberg
a4e70d90df fix dirs 2021-06-07 21:55:24 -04:00
Michael Greenberg
a3cb2d4c2d drop debug, add integration test 2021-06-07 21:52:28 -04:00
Michael Greenberg
f6f9265af3 lol wrong var 2021-06-07 13:37:34 -04:00
Michael Greenberg
5274b73fd8 parsing json with serde 2021-06-07 13:33:06 -04:00
Michael Greenberg
7bbd8e7ce4 switch to fuser, no need for ln shenanigans 2021-06-07 13:04:52 -04:00
Michael Greenberg
eb6fe3efd9 add symlink for macos 2021-06-07 12:15:21 -04:00
Michael Greenberg
a720b0ce57 drop sudo, turn off fail-fast 2021-06-07 12:12:07 -04:00
Michael Greenberg
ce24ccb605 def working this time 2021-06-07 12:09:36 -04:00
Michael Greenberg
ec5ecf1074 try again 2021-06-07 11:44:50 -04:00
Michael Greenberg
c473ab0e4d do it in the shell lol 2021-06-07 11:43:10 -04:00
Michael Greenberg
27785f314d = -> == 2021-06-07 11:40:24 -04:00
Michael Greenberg
932bcfe3b9 fearlessly attempting to add macos support 2021-06-07 11:39:48 -04:00
Michael Greenberg
0a3d1ab48d lol nope 2021-06-07 11:33:57 -04:00
Michael Greenberg
cb87e27ee9 do fuse first, make sure we have dev libs 2021-06-07 11:32:12 -04:00
Michael Greenberg
033f2ff70d first cut at workflow 2021-06-07 11:28:26 -04:00