haskell-nix / hnix-store

Haskell implementation of the Nix store
Apache License 2.0
87 stars 23 forks source link

core: fix nar test failing when there's no /proc #136

Closed sorki closed 3 years ago

sorki commented 3 years ago

Fixing the most pressing one.

Anton-Latukha commented 3 years ago

These are just simple comments. Those comments are not important.

You did a better job than my idea, wanted to do mac-specific detection, but if /proc is used - test that it exists - is much proper programmers way.

I need to learn to look to at platform-specific reports from the code standpoint.

Anton-Latukha commented 3 years ago

Would merge to keep the ball rolling.

Be free to self-merge simple fixes like this.

For example, if to self-merge this yesterday it would've been published to the Hackage in the same sitting and so - people would receive it and you at once can close the reports.

We are not a slow huge enterprise. Out strength is the ease to do refactoring, development & overall flexibility & speed of the position.

We roughly know when the change is such that the cross-review is needed.

Those are some words, they can be ignored and would stay in the stage of air shakers.

sorki commented 3 years ago

I do find these helpful as sometimes I miss some obvious ones as mempty / maybe.

I was wondering if I should do something like test prerequisites as outlined in #121 but in this case it looked better to switch the type of the function to Maybe to account for failure.

Anton-Latukha commented 3 years ago

Well, #121 was opened as a discussion ground to create a separate project for that.

Opened the topic, because there is none currently, and especially at current times and known future things the package probably would be quite popular. Without it programmers need to pass the system information manually to detect the platform program runs on.

But as I see, it is better to make the code work with the environment - it is a more straight programmer thinking.