Comments (13)
@ddengler It's great to have the flexibility. On the other hand, limiting the option to ADD_DEPENDENCY makes the usage easier to understand. It's a trade off between flexibility and ease of use.
Would you give me examples for what you are going to use the flexibility?
(My opinion is still neutral. I want to know what kind of things can be achieved with the flexibility💪)
from swinject-codegen.
@yoichitgy From the top of my head: preprocessor macros or some typedefs or whatever else a user might need in the header I cannot think of right now :)
from swinject-codegen.
And a user does not have to learn the ADD_DEPENDENCY syntax and can just write / copy&paste what he is already used to
from swinject-codegen.
@ddengler Thanks for the answers. Let me take time to think.
@Lutzifer What do you think?
from swinject-codegen.
@ddengler @yoichitgy I would propose a general ADD_HEADER command. Simply using comments for it takes away the possibility to use comments for anything else.
from swinject-codegen.
I think Lutzifer's idea ADD_HEADER is good.
@Lutzifer Do you mean we are going to support only ADD_HEADER? Or will you support ADD_DEPENDENCY too?
from swinject-codegen.
I would only allow AD_HEADER, so
# ADD_DEPENDENCY Keychain
becomes
# ADD_HEADER import "Keychain"
from swinject-codegen.
@Lutzifer I agree, thanks for the clarification.
@ddengler What do you think about @Lutzifer's idea?
from swinject-codegen.
the https://github.com/Swinject/Swinject-CodeGen/tree/example_add_header has a prototype implementation of this
from swinject-codegen.
Rails uses in something like the following
# some comment
for regular comments
#= import "Keychain"
for code to be inserted
Basically the same but a lot shorter
from swinject-codegen.
i like that
from swinject-codegen.
So do I. Let's use #=
to add a header part.
from swinject-codegen.
fixed by #55
from swinject-codegen.
Related Issues (20)
- Use STDIN/STDOUT if -i/-o are not specified HOT 2
- update example code in readme HOT 2
- Release v0.5.0 HOT 2
- Naming consistency of YAML keys HOT 4
- Sort scripts into subdirectories HOT 1
- Use Pull Requests to Test Automatically before Merging into master HOT 2
- rename Resolvable to ResolverType when switching to Swinject 2.0.0. HOT 1
- ruby code style HOT 2
- Re-Write the Readme to get rid of the "issue" and "proposal" style
- Write release notes to be informative
- trailing semicolon leads to defective code
- replace all non a-zA-Z characters in name field with _
- Add information how to use typed arrays and dictionaries to Readme
- mention CodeGen in Swinject Readme HOT 2
- Leaving out component leads to wrong code
- Add a description to the project HOT 2
- Is there any way how to use Swinject's Object Scopes with CodeGen? HOT 1
- Update for Swift 3.0 HOT 1
- add @discardableResult to avoid xcode warnings when registering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swinject-codegen.