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

query "." alias for "deps(current module)" #95

Open
sylr opened this issue Jan 4, 2021 · 2 comments
Open

query "." alias for "deps(current module)" #95

sylr opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
feature request New feature or request
Milestone

Comments

@sylr
Copy link

sylr commented Jan 4, 2021

First, congrats for the query feature, super useful 👏

However, it would be nice if gomod graph . in a go module path would be an alias for gomod graph "deps(current module)".

Regards.

@sylr sylr added the feature request New feature or request label Jan 4, 2021
@Helcaraxan Helcaraxan added this to the 0.6.1 milestone Jan 9, 2021
@Helcaraxan
Copy link
Owner

Helcaraxan commented Jan 9, 2021

Hello @sylr. Thank you for the feedback on the query feature. Currently you can already do:

gomod graph [-p] '/...[:test]'

to achieve your goal.

I do however agree that this should be an example in the README and the path matcher semantics can be improved further by adding wildcard matching (e.g *:test, github.com/*/http, etc). This has my preference over adding an alias as it would keep the query language as simple as possible, and the query processor as well.

I will be adding something in this direction shortly but it won't make the 0.6.0 which just went out. It will however be in the 0.6.1 which should not be too far out. 👍

What do you think?

@Helcaraxan Helcaraxan self-assigned this Jan 9, 2021
@Helcaraxan Helcaraxan modified the milestones: 0.6.1, v0.7.0 Jan 9, 2021
@Helcaraxan
Copy link
Owner

Helcaraxan commented Jan 10, 2021

You can have a look at the latest master now that #108 has been merged. It:

  • adds the defaulting to showing the full dependency graph if no query is specified for gomod graph.
  • switched to much more flexible globstar matching for path-based filters.

Let me know if this suits your ask. If so I'll let you close the issue. 🙂

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

No branches or pull requests

2 participants