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

what about support for files in archives? #121

Open
fommil opened this issue Mar 7, 2017 · 12 comments
Open

what about support for files in archives? #121

fommil opened this issue Mar 7, 2017 · 12 comments
Labels

Comments

@fommil
Copy link

fommil commented Mar 7, 2017

One of the core strengths of nio is that it works on abstract filesystems, such as jar/zip files. We use this to great effect in ENSIME.

Will you be supporting this usecase?

We'd certainly like to use a standard platform library than roll our own, see:

https://github.com/ensime/ensime-server/blob/2.0/util/src/main/scala/org/ensime/util/ensimefile.scala
https://github.com/ensime/ensime-server/blob/2.0/util/src/main/scala/org/ensime/util/path.scala
(deprecating) https://github.com/ensime/ensime-server/blob/2.0/util/src/main/scala/org/ensime/util/file.scala
(deprecating) https://github.com/ensime/ensime-server/blob/2.0/util/src/main/scala/org/ensime/util/io.scala

@fommil
Copy link
Author

fommil commented Mar 7, 2017

(btw, key to the abstract pattern is that there needs to be a clean way to close that abstract filesystem. Keeping jars/zips open is really really bad on Windows https://github.com/fommil/class-monkey )

@pathikrit
Copy link
Owner

Hi, the DNA of better-files was supposed to just add useful implicit defs to java.util.File and thus it is currently only serves as File I/O util using NIO. But there's no reason, it can expand its horizon and work on other filesystems - I just did not have anything immediate in my mind but PRs on this is VERY WELCOME. A lot of the other codes in the files you posted are already in e.g. RichOutpustStream.drain are already in better-files (see OutputStreamOps)

@fommil
Copy link
Author

fommil commented Mar 7, 2017

No description provided.

@jvican
Copy link

jvican commented Mar 7, 2017

@fommil This is a great idea and I can see how it would also be super useful for lots of projects I have in mind.

We'll be publishing this week an official artifact of better-files (/cc @pathikrit), so perhaps we can use that as the first starting point to migrate to it in Ensime and create these abstractions in a PR. What do you think?

@fommil
Copy link
Author

fommil commented Mar 7, 2017

No description provided.

@fommil
Copy link
Author

fommil commented Mar 8, 2017

@pathikrit I really wish I could help out but unfortunately my time to contribute to community projects is already incredibly limited and I have a TODO list longer than I can possibly keep. I'll have to be a bit rubbish and just say: I'm here to help you to take what you want from ENSIME, but I can't commit any time to raise any PRs myself.

@jvican
Copy link

jvican commented Mar 8, 2017

@fommil That makes perfect sense.

If you grant us an Apache 2 license, I could put this a Scala Center hackathon ticket that people could hack on. It wouldn't be difficult to port what you guys have in Ensime to this repository. I think the use case is really worth it. WDYT?

@fommil
Copy link
Author

fommil commented Mar 8, 2017

Yeah, that's fine. I don't think it will be as simple as copy/paste, the API probably needs to be designed to reflect the Path concept of NIO on virtual file systems. I'm not sure if limiting it to just File is going to be as useful as in could be.

Btw we are still missing a lot of the needed functionality, e.g. some way of streaming through the jar contents in an efficient way. My API is random access, and hence very slow for that use case (we currently stream using VFS)

@fommil fommil closed this as completed Aug 27, 2018
@pathikrit
Copy link
Owner

@fommil: Let's not close issues without any comments

@pathikrit pathikrit reopened this Aug 27, 2018
@fommil fommil closed this as completed Aug 27, 2018
@fommil
Copy link
Author

fommil commented Aug 27, 2018

recreate the ticket if you want to track it. I'm closing all my scala tickets.

@pathikrit pathikrit reopened this Aug 27, 2018
@fommil fommil changed the title what about support for files in archives? deleted Aug 27, 2018
@fommil fommil closed this as completed Aug 27, 2018
@pathikrit pathikrit reopened this Aug 27, 2018
@fommil fommil closed this as completed Aug 27, 2018
@fommil
Copy link
Author

fommil commented Aug 27, 2018

Come on... I'm trying to clean up my github search so I can see all my open tickets, as my personal TODO page, and I don't want any scala tickets showing up there. If you want to track this open a new ticket.

@pathikrit
Copy link
Owner

Sorry, this issue is not resolved. I won't close it till it is resolved.

Repository owner locked as spam and limited conversation to collaborators Aug 27, 2018
@pathikrit pathikrit changed the title deleted what about support for files in archives? Aug 27, 2018
@pathikrit pathikrit reopened this Aug 27, 2018
Repository owner unlocked this conversation Aug 27, 2018
Repository owner locked as off-topic and limited conversation to collaborators Aug 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants