Hacker News new | ask | show | jobs
by bartq 1093 days ago
I disagree it's responsibility of the tool. Program should just reach out for files and some higher order or meta runner should trace what the process does. One of the commenters mentioned `strace`, this is the correct approach, but should be done in well engineered way.

Other way is to run program in symbomlic interpreter and trace what it wants to read in any of the branches.

2 comments

This seems to be an interesting approach.

Why do you suggest this path over documentating the behavior explicitly?

What makes one approach better the other? Is it faster to run a trace? Should a developer trace their own code and auto-generate documentation post-build?

Might work for config files but would it work for environment variables?
It would for env vars as well, why not? Just trace program trying to reach out for some var X from env.
afaik reading env vars requires no sys calls and thus will not appear in strace
So there should be a different tool used which will intercept environment variables reads and will log them.