Skip to content

feat: allow filtering module input directories - #6701

Closed
jedevc wants to merge 1 commit into
dagger:mainfrom
jedevc:cmd-dir-include
Closed

jedevc wants to merge 1 commit into
dagger:mainfrom
jedevc:cmd-dir-include

Conversation

@jedevc

@jedevc jedevc commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

Potential fix for #6155.

This is an implementation of @helderco's suggestion in #6155 (comment).

I'll add some tests, and such, but thought I'd throw this together so people can try it.

@jedevc
jedevc requested review from shykes and sipsma and removed request for shykes February 20, 2024 15:11
@jedevc

jedevc commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

Couple issues I've already found (using bash/zsh):

  • You need to use single ' or double " quotes so that * and ** globs aren't expanded by the shell.

    So --src=/some/dir,*.foo needs to be written as --src=/some/dir,"*.foo" (or similar)

  • You need to use single ' quotes so that ! history expansion isn't expanded by the shell:

    So --src=/some/dir,!bin needs to be written as --src=/some/dir,'!bin' (or similar)

This isn't a dealbreaker, but it does make for a rather awkward calling experience - I'm okay with something like this for a first-pass though.

@jedevc
jedevc requested review from helderco, shykes and vito February 20, 2024 15:19
@sipsma sipsma added this to the v0.10.0 milestone Feb 24, 2024
@sipsma

sipsma commented Feb 24, 2024

Copy link
Copy Markdown
Contributor

This isn't a dealbreaker, but it does make for a rather awkward calling experience - I'm okay with something like this for a first-pass though.

Agreed, you need to deal with this all the time with grep or any CLI that accepts globs/regex/etc. It's not awesome but also par for the course.

Overall this approach LGTM

@sipsma

sipsma commented Feb 24, 2024

Copy link
Copy Markdown
Contributor

Also, provisionally added this to v0.10.0 milestone since the linked issue is on that milestone. I personally would be okay with it being in v0.10.x instead if time runs low though.

@jedevc
jedevc marked this pull request as ready for review February 26, 2024 14:43
@sipsma

sipsma commented Feb 26, 2024

Copy link
Copy Markdown
Contributor

There's still ongoing discussion about how to approach this in #6155 so I'm going to move this to the v0.10.x milestone for now. All the approaches are backwards compatible so I think it's safe to push it to a subsequent minor release. cc @jedevc

@sipsma sipsma modified the milestones: v0.10.0, v0.10.x Feb 26, 2024
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@jedevc

jedevc commented Mar 18, 2024

Copy link
Copy Markdown
Contributor Author

Closing this in preference of #6857.

@jedevc jedevc closed this Mar 18, 2024
@gerhard gerhard modified the milestones: v0.10.x, v0.10.3 Mar 28, 2024
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

Successfully merging this pull request may close these issues.

3 participants