Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

WIP: Xref callers #68

Closed
wants to merge 4 commits into from
Closed

WIP: Xref callers #68

wants to merge 4 commits into from

Conversation

carloslima
Copy link
Collaborator

@carloslima carloslima commented Nov 15, 2016

Closes #51

This is mostly a copy from Mix with the non relevant parts stripped out.
And the printing to stdout functions replaced with returning values

Issue #51
Instead of having a modified version of the xref mix task, we can just
call `mix` and parse the results
@carloslima
Copy link
Collaborator Author

@slashmili What do you like better?

Something along the lines of
94a02da

or the simpler approach of
967ab84
?

I'm leaning towards just calling mix. Would you agree?

@carloslima
Copy link
Collaborator Author

Comparing the commits is somewhat unfair.

The first one is a stripped down copy of the mix task implementation, missing the vim integration.

The second one is the vim integration without the elixir part since it calls mix xref ... directly from the python client instead of relying on the alchemist-server for this.

@slashmili
Copy link
Owner

I got an error but I can't see the full python stack trace. I'll check it later.

BTW does it work in umbrella projects?

@briandunn
Copy link

Anything I can do to help get this merged? Would love to be able to pull up a caller list in the cw.

@slashmili
Copy link
Owner

@briandunn actually we had some discussion over chat which is not included here.

There are two problems:

  1. It won't work if you have used the function in your test environment(.exs files are not compiled)
  2. It doesn't work well in umbrella projects.

when you run the mix xref callers XXXXXXXX on an umbrella project.
it returns something like:

lib/app_a/my_a_mod.ex:11 XXXXXXXX
web/controllers/api/my_api.ex:24 XXXXXXXX
lib/app_b/my_b_mod.ex:9 XXXXXXXX

The sub app name is missing on that path to file.

Any suggestion would be appreciated

@jfornoff
Copy link

Hey,

I got a PR into Elixir yesterday, that gives info on the sub app name.
Not a full path, but the mix xref output is prefixed with the sub app name, see here. Maybe that helps with making this work :-)

@slashmili slashmili closed this Nov 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants