-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add file and directory report skeleton #116
Conversation
When creating files as part of the cut command, we will use a proxy that logs information about the hash, path, mode, etc. This will then be ingrated into a report which will be part of chisel.db.
The report will be the main data source for chisel.db.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. Only left a few comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. It's close, with mostly simpler stuff.
} else { | ||
c.Assert(treeDumpFSCreator(creator, dir), DeepEquals, test.result) | ||
} | ||
// [fsutil.Create] does not return information about parent directories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bracketed naming doesn't seem typical. I believe the typical convention in Go is to document types cleanly (foo.Bar), or has something changed in this regard recently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that you can use brackets for documentation links here: https://tip.golang.org/doc/comment#doclinks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The report will be the main data source for chisel.db. This PR introduces the skeleton and the reporting functionality in the package extractor.
Tests for checking the final report after slicing have been intentionally omitted. Until we land #113, it is very difficult to inspect and change the slicer tests. On top of that right now the tests would be meaningless because they do not conform to the business logic of chisel.db. Because we are developing the feature iteratively in small PRs, I will add the rest of business logic in the next PR together with all the tests. At that point we can inspect them and now if the implementation is working or not and discuss corner cases.