robotlegs / swiftsuspenders

Fast and light-weight IoC container for AS3
MIT License
55 stars 18 forks source link

Fix constructor named injections #13

Closed fljot closed 8 years ago

fljot commented 8 years ago

Such annotation for constructor injection

[Inject(name="", name="foo")]

was parsed incorrectly, resulting in injector trying to put named dependency as the first argument. I'm sorry, I couldn't run tests here (env is not setup), did fix via Github UI. Would be great if somebody could confirm fix!

fljot commented 8 years ago

Did setup env, will update PR tomorrow (will add test).

fljot commented 8 years ago

Done. All tests green.

But to run from Maven I had to disable filtering for testResource node in pom, otherwise I have following build error:

[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ swiftsuspenders ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to /Users/fljot/Development/Projects/swiftsuspenders/target/build/support/app-domain-test-files
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.181s
[INFO] Finished at: Sat Jan 23 17:54:10 EET 2016
[INFO] Final Memory: 20M/358M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:testResources (default-testResources) 
darscan commented 8 years ago

Hi @fljot

Thanks for the fix (and sorry for the delayed response..).

Looks good. Does the test fail without the fix? (I'm also not set up properly at the moment).

fljot commented 8 years ago

@darscan Yes, I specifically made the test as first commit to be able to run and see that it fails =)

darscan commented 8 years ago

Ah.. I should have noticed that. Thanks!

darscan commented 8 years ago

As for the Maven problem.. I assume that happens with and without the fix?

fljot commented 8 years ago

ofc

fljot commented 8 years ago

@darscan can we also bump version to 2.1.1? Do you want pull request?

darscan commented 8 years ago

Sure thing, pull request would be nice. These are the 3 files that need to be updated: https://github.com/robotlegs/swiftsuspenders/commit/d6cf6e135cd8029fc0b8606bc191469953d03535