Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

utils/fs: move 'os' and 'test' to separate packages. #93

Merged
merged 4 commits into from
Oct 24, 2016
Merged

utils/fs: move 'os' and 'test' to separate packages. #93

merged 4 commits into from
Oct 24, 2016

Conversation

smola
Copy link
Collaborator

@smola smola commented Oct 24, 2016

  • create utils/fs/test package to expose generic test suite to 3rd party fs implementations.
  • move 'os' to its own package to avoid cyclic dependency (test -> fs -> test, becomes test -> fs, os -> test, os -> fs).
  • remove TestCreateAndWrite: some of our implementations cannot read a file that was just created, written and not closed yet.

smola added 2 commits October 24, 2016 10:51
* Our FS contract does not allow that a file can be read
  without closing it after writing.
* We are not testing this and leave it as implementation-dependent
  behaviour.
Copy link
Contributor

@alcortesm alcortesm left a comment

Choose a reason for hiding this comment

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

Why are we moving os type to its own package?

We have been moving os back and forth its own package several times now :), we should make a final decision about it.

@smola
Copy link
Collaborator Author

smola commented Oct 24, 2016

@alcortesm We moved the generic fs suite to a separate package test so that is can be used by 3rd party fs implementations. Now the os implementation depends on test and test depends on fs, so it is a cyclic dependency and not allowed. So we need to have os in its own package if we want to expose the test package. I'm updating the PR description with this.

@smola smola merged commit 0327891 into src-d:master Oct 24, 2016
@smola smola deleted the refactor-fs-tests branch October 24, 2016 13:14
mcuadros pushed a commit that referenced this pull request Jan 31, 2017
* create utils/fs/test package to expose generic test suite to 3rd party fs implementations.
* move 'os' to its own package to avoid cyclic dependency (test -> fs -> test, becomes test -> fs, os -> test, os -> fs).
* remove TestCreateAndWrite: some of our implementations cannot read a file that was just created, written and not closed yet.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants