Skip to content

Push getFSAccessor unsupported(...) down Store class hierarchy#8217

Merged
roberth merged 1 commit intoNixOS:masterfrom
obsidiansystems:push-get-fs-accessor-unsupported-down
Apr 14, 2023
Merged

Push getFSAccessor unsupported(...) down Store class hierarchy#8217
roberth merged 1 commit intoNixOS:masterfrom
obsidiansystems:push-get-fs-accessor-unsupported-down

Conversation

@Ericson2314
Copy link
Member

Motivation

More progress on issue #5729.

Instead of having it by the default method in Store itself, have it be the implementation in DummyStore and LegacySSHStore. Then just the implementations which fail to provide the method pay the "penalty" of dealing with the icky unimplemented function for non-compliance.

Context

Combined with my other recent PRs, this finally makes Store have no unsupported calls!

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

More progress on issue NixOS#5729.

Instead of having it by the default method in `Store` itself, have it be
the implementation in `DummyStore` and `LegacySSHStore`. Then just the
implementations which fail to provide the method pay the "penalty" of
dealing with the icky `unimplemented` function for non-compliance.

Combined with my other recent PRs, this finally makes `Store` have no
`unsupported` calls!
@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Apr 13, 2023
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is safer by making explicit what is unsupported.

@roberth roberth merged commit f5ab38a into NixOS:master Apr 14, 2023
@Ericson2314 Ericson2314 deleted the push-get-fs-accessor-unsupported-down branch April 14, 2023 13:13
Ericson2314 added a commit to obsidiansystems/nix that referenced this pull request Jan 18, 2024
…rchy

Instead of having it be the default method in `Store` itself, have it be
the implementation in `DummyStore` and `LegacySSHStore`. Then just the
implementations which fail to provide the method pay the "penalty" of
dealing with the icky `unimplemented` function for non-compliance.

Picks up where NixOS#8217. Getting close to no `unsupported` in the `Store`
interface itself!

More progress on issue NixOS#5729.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants