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

Add T.source as an alternative to T.sources but for single files #546

Closed
lefou opened this issue Feb 14, 2019 · 3 comments
Closed

Add T.source as an alternative to T.sources but for single files #546

lefou opened this issue Feb 14, 2019 · 3 comments
Milestone

Comments

@lefou
Copy link
Member

lefou commented Feb 14, 2019

Using T.sources in case where only a single file is expected, leads to unnecessary error sources.

@lefou
Copy link
Member Author

lefou commented Dec 24, 2019

I'm asking myself, if the already present T.input[PathRef] is enough.

According to documentation and my personal experience, T.input[Seq[PathRef]] and T.sources should behave identical, except the more specialized type.

@lefou
Copy link
Member Author

lefou commented Dec 24, 2019

So, instead of a new def myFile = T.source(theFile) we might just write def myFile = T.input { PathRef(theFile) }

lihaoyi added a commit that referenced this issue Dec 24, 2019
Add T.source to listen to a single source file/folder

#546

Largely copy-pasted from T.sources, with all the Seq-related stuff removed

Not super heavily tested, but I stuffed a single usage into JavacCompileJavaTests to make sure it at least gets some coverage. Seems to work.

Review by @lefou
@lihaoyi
Copy link
Member

lihaoyi commented Dec 24, 2019

#749

@lihaoyi lihaoyi closed this as completed Dec 24, 2019
@lefou lefou added this to the after 0.5.6 milestone Dec 25, 2019
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

2 participants