Skip to content

First cut at Phoenix 1.3 projections. Fixes #10#11

Open
qtrfeast wants to merge 1 commit into
c-brenn:masterfrom
qtrfeast:phoenix-1.3-projections
Open

First cut at Phoenix 1.3 projections. Fixes #10#11
qtrfeast wants to merge 1 commit into
c-brenn:masterfrom
qtrfeast:phoenix-1.3-projections

Conversation

@qtrfeast
Copy link
Copy Markdown

I noticed the projections were off for Phoenix 1.3 and found #10. I've written a .projections.json file for my own project and wanted to share it back (see .projections.json).

This PR is a first cut at adapting my projections into phoenix.vim. Do you mind taking a look and letting me know what else is necessary to help ship a 1.3 update for the librrary?

@c-brenn
Copy link
Copy Markdown
Owner

c-brenn commented Feb 13, 2018

Looks great, thanks so much for the PR. I really appreciate the help.

I've been away from Phoenix for a while so need to look up the exact changes. Off the top of my head I think there are one or two other things that will need to be changed in this PR:

  1. I'm pretty sure that template_for will need to be updated to reflect the new module structure. This function generates the initial content for files that get created with projectionist.

    • The module naming might be out of date (it generates stuff like MyApp.FooController).
    • Similarly the imports (e.g.use MyApp.Web.Controller) are probably out of date too.
  2. The logic to find matching files using gf may need to be updated. I'm not sure about this one, it might still work fine so it's worth testing out. It should be a very small change. You can see here that everything in web/ is added to path, we probably just need to change this to wherever the new location is (lib)?

If I think of anything else I'll add it here.

Thanks again for your contribution ❤️. If you want to tackle the points above feel free, it might be a while before I can get around to them

@qtrfeast
Copy link
Copy Markdown
Author

Thanks for the pointers! I’m actually just learning Phoenix mysef so this was a great way to more deeply understand project structure. I’ll definitely give this a try as time permits.

@felbit
Copy link
Copy Markdown

felbit commented Nov 8, 2018

The gist has moved here: .projections.json

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