Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track all modules created by Generamba #70

Closed
etolstoy opened this issue Jan 8, 2016 · 10 comments
Closed

Track all modules created by Generamba #70

etolstoy opened this issue Jan 8, 2016 · 10 comments

Comments

@etolstoy
Copy link
Member

etolstoy commented Jan 8, 2016

I've received a couple of feature requests for the command generamba module list, which would print out all of the modules, created in the current project by Generamba. This feature requires implementation of module tracking.

This can be implemented by adding a special information file, generated alongside with a new module. This file (.rambamodule) may look like:

module_name: BrandNewModule
template_name: rviper_controller
template_version: 1.0.3

So, when a user runs generamba module list, we can find all of this information files in the project dir, parse them and print out the module list.

Storing this kind of information allows us to implement other cool things - e.g. deleting/copying modules from command line.

@mogol @AndreyZarembo @Beniamiiin what are your thoughts?

@mogol
Copy link
Contributor

mogol commented Jan 8, 2016

What is it for?

@etolstoy
Copy link
Member Author

etolstoy commented Jan 8, 2016

  • You are opening the project for a very first time and want to know, what parts of the project were generated by Generamba,
  • One of the templates, used in the current project, was updated to a new version - and you want to adopt it in your project,
  • By having the ability to reference any module, it's possible to use commands like generamba module copy --src --dest or generamba module remove --src.

As far as I remember, @MaksimBazarov was one of the clients, who wanted this feature to be implemented. Do you also have thoughts?

@MaximBazarov
Copy link
Contributor

I think list command is need but my case is when you use gen command you might be needed list of possible modules but I don't sure about delete?

Сontrariwise copy will really cool, but I can't imagine how it will work, what if i already made some changes after module was generated?

@mogol
Copy link
Contributor

mogol commented Jan 8, 2016

Imho,

  1. Statistic is interesting for us. We should measure usage of generamba. But in general, for users, it seems useless - all your modules should be generated by generamba :)
  2. It is impossible to update module with new templates. And also you are maintaining projects and money, not modules and templates version. Only interest is in external modules, e.g. from cocoa pods.
  3. I really like copying modules. But removing also seems useless. What is removing? You have only to right click in Xcode and press delete group.

@etolstoy
Copy link
Member Author

etolstoy commented Jan 8, 2016

  1. It's not for statistic purposes - it's for code consistency. It's pretty hard to remember, which one template was used to generate a specific module. When there are a lot of different templates, it can become a pretty major issue. So, when smb from the team would be adding a new feature, instead of exploring every installed template to understand, which one to use, he would just look, what was used for the similar tasks.
  2. I was talking about manual updates. Imagine the issue, when we distributed a template, which has a retain cycle - you'll definitely want to list every place in your project where this template was used to manually update it.
  3. Removing is handy, because we want to remove not only files, but also tests.

@mogol
Copy link
Contributor

mogol commented Jan 8, 2016

  1. You should know every templates to select the best one for your task. Copy&Paster is evil :)
  2. And what is next? Editing .rambamodule by hand and correcting modules version?
  3. Removing two folders is not a problem at all. I don't see any profit. 👎
    It seems to be difficult features without evident profit.

Maybe some more clear cases?

@etolstoy
Copy link
Member Author

etolstoy commented Jan 8, 2016

@mogol

  1. Sometimes new people in the team (especially for a freelance projects) don't have both time and desire to dive into the whole project and into all of the templates - they just have to add a new screen, or a new service. Generamba is all about eliminating direct copy/paste :)
  2. Step one - you know every outdated module in your project, so you can either upgrade it, or leave it alone, depends on the version changes. Step two - yep, correcting it manually.
  3. Well, I can imagine templates for modules, which are not contained in a single folder, but spread between multiple locations (e.g. generating new ModelObject - its managed-object part is located in one foler, PONSO - in another, protocol - in the third). Another good usecase for this feature - deleting the module right after generating in case of a typo. Of course, removing modules itself isn't a much-needed feature, but it could be easily implemented after the whole generamba module infrastructure is ready.

@mogol
Copy link
Contributor

mogol commented Jan 8, 2016

👎
too difficult
over engineering
additional manual work for users

Did we have any of this problems in past?
To my mind, it's not critical/necessary task now.

@etolstoy
Copy link
Member Author

etolstoy commented Jan 8, 2016

As I've already told - there were feature requests, so it's hardly an over engineering. But I agree that it's not a critical task, but a nice feature for future releases.

@etolstoy
Copy link
Member Author

Closed as absolete. Won't implement it.

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

No branches or pull requests

3 participants