Skip to content
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

Switch baseDir to http.FileSystem #4

Open
cryptix opened this issue Aug 9, 2015 · 3 comments
Open

Switch baseDir to http.FileSystem #4

cryptix opened this issue Aug 9, 2015 · 3 comments

Comments

@cryptix
Copy link

cryptix commented Aug 9, 2015

Hi!

http.FileSystem would allow to operate in remotes, too.

For locals you would just throw in 'http.Dir(baseDir)'.

@dmitshur
Copy link

FWIW, I think this is a fantastic idea. 👍

@ChimeraCoder
Copy link
Owner

@shurcooL Thanks for the feedback! This looks feasible, and #5 was the first step towards this.

The challenge is that some of the original functions were written with the assumption that the file would be available locally. Any calls to os.Open (or even os.Stat) will need to be replaced.

I also need to think of how we would test for this given our current testing setup. As I understand it, we can't just test that the current tests work with the new logic. Since our test environment does provide access to the local filesystem, even if we pass in the base directory with http.Dir(baseDir) it will still allow hidden calls to functions that won't work with a remote repository (like os.Open called with a relative path). So we can't use the current tests to be sure that we have eliminated these.

There's probably a way around this; I'll need to think what it would be.

@imranansari
Copy link

any more thoughts/plans on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants