Commit | Line | Data |
77d892df |
1 | # Known Bugs: |
cdb34619 |
2 | |
3 | - Bug ->go or ->visit causes actions which have Args or CaptureArgs called |
4 | twice when called via ->go or ->visit. |
5 | |
6 | Test app: http://github.com/bobtfish/catalyst-app-bug-go_chain/tree/master |
7 | |
77d892df |
8 | # Compatibility warnings to add: |
9 | |
10 | - $self->config should warn as config should only ever be called as a |
5d94e8f9 |
11 | class method (TESTS). |
77d892df |
12 | |
13 | # Proposed functionality / feature additions: |
14 | |
15 | ## Log setup needs to be less lame |
16 | |
17 | So Catalyst::Plugin::Log::* can die |
18 | in a fire. Having $c->log_class would be a good start. kane volunteered |
19 | to do some of this. |
20 | |
21 | Simple example: Catalyst::Plugin::Log::Colorful should just be a |
22 | subclass of Catalyst::Log, no ::Plugin:: needed. |
23 | |
24 | See also: Catalyst::Plugin::Log::Dispatch and |
25 | http://github.com/willert/catalyst-plugin-log4perl-simple/tree |
26 | |
5f99445c |
27 | ## Capture arguments that the plack engine component was run with somewhere, |
28 | to more easily support custom args from scripts (e.g. Gitalist's |
29 | --git_dir) |
77d892df |
30 | |
5f99445c |
31 | ## throw away the restarter and allow using the restarters Plack provides |
32 | |
33 | ## remove per-request state from the engine instance |
34 | |
35 | ## be smarter about how we use PSGI - not every response needs to be delayed |
36 | and streaming |
37 | |
38 | # The horrible hack for plugin setup - replacing it: |
77d892df |
39 | |
40 | * Have a look at the Devel::REPL BEFORE_PLUGIN stuff |
41 | I wonder if what we need is that combined with plugins-as-roles |
42 | |
5f99445c |
43 | # PSGI |
29aba7b9 |
44 | |
5f99445c |
45 | ## To do at release time |
8d3aaa60 |
46 | |
47 | - Release psgi branch of Catalyst-Devel |
48 | - Release new Task::Catalyst |
394cd4be |
49 | - Release 5.9 branch of Catalyst-Manual |
7ebac5f8 |
50 | - Release Catalyst::Engine::HTTP::Prefork with deprecation notice |
da9eab5a |
51 | + exit in Makefile.PL if Catalyst > 5.89 is installed. |
8d3aaa60 |
52 | |
5f99445c |
53 | ## Blockers |
102e063c |
54 | |
1d5e4ba3 |
55 | * I've noticed a small difference with Catalyst::Test. The latest stable |
56 | version include two headers, 'host' and 'https'. They are missing from |
8d3aaa60 |
57 | this version - Pedro Melo on list |
58 | ^^ Cannot replicate this? Mailed back to ask for tests.. |
50a65bb3 |
59 | |
5f99445c |
60 | # App / ctx split: |
77d892df |
61 | |
62 | NOTE - these are notes that t0m thought up after doing back compat for |
5d94e8f9 |
63 | catalyst_component_class, may be inaccurate, wrong or missing things |
77d892df |
64 | bug mst (at least) to correct before trying more than the first 2 |
65 | steps. Please knock yourself out on the first two however :) |
66 | |
67 | - Eliminate actions in MyApp from the main test suite |
68 | - Uncomment warning in C::C::register_action_methods, add tests it works |
69 | by mocking out the logging.. |
70 | - Remove MyApp @ISA controller (ask metaclass if it has attributes, and if |
71 | so you need back compat :/) |
72 | - Make Catalyst::Context, move the per request stuff in there, handles from |
73 | main app class to delegate |
74 | - Make an instance of the app class which is a global variable |
75 | - Make new instance of the context class, not the app class per-request |
76 | - Remove the components as class data, move to instance data on the app |
77 | class (you probably have to do this for _all_ the class data, good luck!) |
78 | - Make it possible for users to spin up different instances of the app class |
79 | (with different config etc each) |
80 | - Profit! (Things like changing the complete app config per vhost, i.e. |
81 | writing a config loader / app class role which dispatches per vhost to |
82 | differently configured apps is piss easy) |
19c64905 |
83 | |
84 | ## GSOC |
85 | |
4af15971 |
86 | ### Final steps for GSOC |
87 | |
88 | ##### Things that work: |
89 | |
878cfbf2 |
90 | - the default container loads all components, calls ACCEPT_CONTEXT() when appropriate, and COMPONENT() when appropriate, behaving like current Catalyst does |
91 | |
92 | - its possible to create a custom container, and override the components you want. Lifecycle, class, dependencies, all overridable. |
93 | |
94 | - config files are loaded without Catalyst::Plugin::ConfigLoader |
95 | |
96 | - per request life cycle somewhat works |
97 | |
98 | - external modules are loaded just using a custom container, much like Catalyst::Model::Adaptor |
99 | |
4af15971 |
100 | ##### Things that don't work: |
101 | |
878cfbf2 |
102 | - expand_component_module |
103 | |
878cfbf2 |
104 | - sugar is still not completely implemented |
105 | |
106 | - Some back compat |
107 | - wrappers around setup_component, setup_components, locate_components in Catalyst.pm |
108 | - $instance->expand_modules |
109 | - search_extra |
110 | - Crazy tests for things such as: |
111 | sub COMPONENT { |
112 | ... |
113 | *${appclass}::Model::TopLevel::GENERATED::ACCEPT_CONTEXT = sub { ... }; |
114 | ... |
115 | } |
116 | |
4af15971 |
117 | ##### Need planning, have questions: |
118 | |
878cfbf2 |
119 | - per request life cycle |
120 | |
121 | - sugar - we should discuss the syntax with rafl and edenc |
122 | |
123 | - when / when not COMPONENT should be called |
124 | |
125 | - locate_components service vs setup_components method |
126 | - can we be more lazy? |
127 | - should setup_components be a service that things like the ->component lookup |
128 | can depend on? |
129 | |
130 | - There are a few more FIXMEs, idk if any relevant here |
131 | |
4cb56916 |
132 | ### Next steps - planned: |
133 | |
4af15971 |
134 | - some imports need to get the importing package in Catalyst::IOC |
9527a3af |
135 | - done - needs testing |
4af15971 |
136 | |
4af15971 |
137 | - Back compat for Catalyst.pm moved methods (locate_components) |
9527a3af |
138 | - done - needs testing |
4af15971 |
139 | |
4cb56916 |
140 | - Test custom container |
141 | - writing some tests which verify that the models you think should be |
142 | there are there, and that they received their dependencies as arguments |
143 | - i.e. Model::Bar should get params { foo => $model_foo } when being |
144 | constructed, etc |
145 | - Need to test that if you have a standard component Frotz |
146 | and a customized component Fnar, and Fnar depends on Frotz |
147 | - And yeah, some tests that the customised components actually work via |
148 | $c->model('Foo'), and that COMPONENT is called (or not called) |
149 | as appropiate and that ACCEPT_CONTEXT is called (or not) as appropriate |
150 | |
a43734f6 |
151 | ### Next steps - less planned: |
731a4757 |
152 | |
47500a27 |
153 | - make ACCEPT_CONTEXT and COMPONENT optional in Catalyst::IOC::BlockInjection and Catalyst::IOC::ConstructorInjection |
154 | - Create COMPONENTSingleton life cycle |
155 | |
731a4757 |
156 | - Test cases for extending the container in an application. |
334eb9fb |
157 | - Using the sugar added in the previous item |
158 | - Test when Model::Foo depends_on Model::Bar |
2bf1bef6 |
159 | - Test for component Foo => ( lifecycle => 'Singleton', class => 'My::External::Class', dependencies => { config => depends_on("config") } ) |
160 | - Fix ^^ so that you can get your component's namespaced config nicely. |
731a4757 |
161 | |
88e5cd24 |
162 | - Tests for using the container outside of Catalyst |
163 | - Custom container which adds some (very simple) services which are initialized from |
164 | the application config file (note plain services, not components) |
165 | - Depend on (and test) these inside Catalyst |
166 | - Test loading container outside Catalyst, and these services working |
167 | - Test Catalyst / MyApp is not loaded |
4634d3ad |
168 | |
f5dbaa05 |
169 | #### Extending my app, notes |
170 | |
171 | Basically try to implement something like this (starting out without the sugar!), and see how it breaks |
172 | and what needs to be done to fix it! |
173 | |
174 | ##### Eventual syntax |
175 | |
176 | package MyApp::Container; |
177 | use Catalyst::IOC; |
178 | |
2bf1bef6 |
179 | container $self, as { |
f5dbaa05 |
180 | container model => as { |
181 | component Foo => (); # As per default! |
182 | component Bar => (dependencies => ['/model/Foo']); # Magic! |
183 | component Baz => ( lifecycle => 'InstancePerContext ); |
184 | component Quux => ( lifecycle => 'Singleton' ); # ACCEPT_CONTEXT not called |
2bf1bef6 |
185 | # Catalyst::Model::Adaptor example |
186 | conponent Fnar => ( lifecycle => 'Singleton', class => 'My::External::Class', dependencies => { config => depends_on('config')} ); |
187 | # ^^ FIXME - gets whole config, not Model::Foo |
188 | # There should be a 'nice' way to get the 'standard' config |
f5dbaa05 |
189 | }; |
190 | # Note - implementation of BB may need to be changed to support making sure existing |
191 | # services actually get overridden. not sure how the default container behaves when doing that |
192 | # above code would build the constructor injection as it currently does, |
193 | # defaulting to the class name in the right namespace as declared by the surrounding container |
194 | # as well as adding using the catalyst-specific service class |
195 | }; |
196 | |
197 | 1; |