Skip to content

Add Dancer2::Manual::Migration #583

Description

@racke

We need migration docs for moving Dancer apps, plugins and engines from Dancer1 to Dancer2.

Please dump all information into this issue, I'll compile it in a POD later.

Regards
Racke

Activity

  1. self-assigned this
    on May 2, 2014
  2. racke commented on May 2, 2014

    @racke
    MemberAuthor

    forward instead of request->path_info in before hook.

  3. racke commented on May 12, 2014

    @racke
    MemberAuthor

    Commandline options (#471).

  4. xsawyerx commented on May 19, 2014

    @xsawyerx
    Member
    • No middleware support. (use Plack::Builder instead)
    • Use Test::Plack, not Test::TCP, LWP::Protocol::PSGI, or Dancer2::Test.
  5. xsawyerx commented on May 19, 2014

    @xsawyerx
    Member

    Speeding up your app in D2:

    • URL::Encode::XS
    • CGI::Deurl::XS
    • HTTP::Parser::XS
  6. xsawyerx commented on May 28, 2014

    @xsawyerx
    Member

    Additional change:

  7. shumphrey commented on May 30, 2014

    @shumphrey
    Contributor

    hooks are now app specific not global

  8. xsawyerx commented on Jun 1, 2014

    @xsawyerx
    Member
    • No need for ':syntax' anymore
  9. racke commented on Jun 25, 2014

    @racke
    MemberAuthor

    before hook is fired even on files in public - that might be a bug!?

  10. jacqueslareau commented on Aug 6, 2014

    @jacqueslareau

    [% if settings.environment == "development" %]

    Was working in Dancer1, not anymore.

  11. xsawyerx commented on Aug 6, 2014

    @xsawyerx
    Member

    Those might be bugs though. Let's open "question" issues for them.

  12. jacqueslareau commented on Aug 6, 2014

    @jacqueslareau
    • A note on how engines (session, logger) configuration changed.
    • Dancer2::Session::DBI and Dancer2::Plugin::Auth::Extensible are not available yet.
    • hooks are not global anymore.
    • Cannot seem to find any information on "use Dancer2 appname => 'MyApp';" as a patch.
    • :script ?
    • behind_proxy: just wanted to point out that it's not clear if behind_proxy replaces ReverseProxy, or if both can be used together or not
  13. xsawyerx commented on Aug 6, 2014

    @xsawyerx
    Member

    Adding a new comment for each one of those makes it harder to track. I'm going to post a comment now answering some of them and tomorrow (hopefully morning) I will go over and merge the issues into the original comment so we could track it more easily.

    • Plugins are not core. We're tracking changes in Dancer core itself. While it's good to know that Dancer2::Plugin::DBIC changed its key (and I agree it should not have, or at least should support both keys), it's not something that should be fixed in Dancer2 core, because it's not in core to begin with. It's a third-party module. You also opened a separate issue on it. We can't fix it, only the author of the module can. I will close that issue tomorrow.
    • The behind_proxy comment is too vague. Please expand.
    • Plugins are, again, not part of core. It's not that Dancer2::Session::DBI and Dancer2::Plugin::Auth::Extensible are not available in Dancer2. They aren't in Dancer1 either. It's that those plugins don't exist. Again, that's not up to us to fix.
    • hooks do no need to be global. They are app-dependent. I'm happy you noted that because it's important, but I want to address your comment on "I don't have a clue how to make a global hook anymore": you don't need to. "Global hooks" are actually App-dependent hooks. You can then merge Apps under a common appname.
    • :script is not needed. :syntax is not needed. @racke covered that above. Please review.

    That's a start. Tomorrow I'm cleaning these comments and merging them in.

    I would really appreciate it if, when you get another fantastic (not being cynical here) burst of "let's document these changes", please write a single comment with everything instead of 8 (I counted) different small one-line comments.

    Again, we appreciate it. Thank you. :)

  14. jacqueslareau commented on Aug 7, 2014

    @jacqueslareau

    Sorry about all the comments. Please merge.

    It's a burst because I just migrated the first of my many Dancer1 app and documented problems I encountered.

    I clearly understand that plugins aren't in Dancer core. But they are major elements of the Dancer ecosystem. I may have misunderstood @racke when he wrote " moving Dancer apps, plugins ". He probably meant a guide for plugin devs to upgrade. I'm writing all of this as a Dancer user, not a core dev. So from my point of view, having this information at least somewhere (at least as a link to a blog post) would have saved me time.

    • As for :script, I don't see a reference to it. I understand it, just wanted to point it out for the manual.
    • DBIC: I opened the issue in the DBIC repo, not Dancer.
    • behind_proxy: just wanted to point out that it's not clear if behind_proxy replaces ReverseProxy, or if both can be used together or not. Again, it's coming from a user.

    Keep up the good work. I'm a big fan.

  15. xsawyerx commented on Aug 7, 2014

    @xsawyerx
    Member

    Your input on this is super critical. Honestly this is the best we could have hoped for - having a user move their app, see what happen, and document it.

    Our intention with plugins is to:

    • Notify the authors
    • Help them out (like starting to provide pull requests)
    • Make necessary shims (like the last dev release will do for the previous ones) to help ease them in
    • Help out with actual releases if they stall

    This might possibly even extend to "port the plugin to this version" because the author might not. My point was merely to realize this is not part of core, but part of the core team wanting to make this transition more feasable. I suppose documenting this as "a change you might expect with Dancer2", rather than "this is what changed in Dancer2" is practical. I apologize for jumping the gun.

    :script was meant to help write one-liners that call the app, and the app would parse the command line options. This is not just unnecessary (because plackup covers all those that were needed) but added additional maintenance and unknown behavior for those that haven't known this feature. We currently do not die or warn on it, to - again - make it an easier transition. At some point we will.

    As for DBIC, my bad! Thanks. :)

    Regarding behind_proxy: that is a very good comment. We'll need to make that clear. We're also not certain yet what we'll do with it.

    Thanks again!

  16. racke commented on Aug 7, 2014

    @racke
    MemberAuthor

    On 08/07/2014 12:37 AM, Jacques Lareau wrote:

    Plugin Dancer2::Plugin::DBIC
    In Dancer1, 'password' was a valid configuration key. Now you must use 'pass'.
    ironcamel/Dancer2-Plugin-DBIC#6 ironcamel/Dancer2-Plugin-DBIC#6

    —
    Reply to this email directly or view it on GitHub #583 (comment).

    Dancer::Plugin::DBIC complains about password as well.

    Regards
    Racke

    Perl and Dancer Development

    Visit our Perl::Dancer conference 2014:

    http://act.perl.dance/

  17. racke commented on Aug 7, 2014

    @racke
    MemberAuthor

    xsawyerx: what about starting by putting the information into the Github Wiki. That would be easier for users to get involved?

  18. xsawyerx commented on Aug 7, 2014

    @xsawyerx
    Member

    @racke I don't mind. I don't know if it will help more, but maybe.

  19. racke commented on Aug 7, 2014

    @racke
    MemberAuthor

    Also we won't carry around a half baken POD :-).

  20. xsawyerx commented on Aug 10, 2014

    @xsawyerx
    Member

    +1

  21. xsawyerx commented on Nov 9, 2014

    @xsawyerx
    Member

    Since the Migration document is already out and released, I'm closing this issue.

    With any new migration documentation improvement, feel free to open a new issue or a pull request to the current document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions