ember-codemods / ember-angle-brackets-codemod

Codemod to convert curly braces syntax to angle brackets syntax
MIT License
60 stars 32 forks source link

Making Telemetry optional instead of default #282

Closed rajasegar closed 4 years ago

rajasegar commented 4 years ago

There are a lot of issues being reported with Telemetry, and especially for addons, I am not quite sure how it will work. So I am thinking to make this optional using a command-line flag something like --telemetry=true. By default, the value of this flag will be false, i.e., telemetry will be disabled.

So without telemetry (default) :

npx ember-angle-brackets-codemod  ./path/of/files/ or ./some**/*glob.hbs

With telemetry

npx ember-angle-brackets-codemod --telemetry=true http://localhost:4200 ./path/of/files/ or ./some**/*glob.hbs

Related issues:

274

243

242

217

200

I really need some consensus and discussion from the collaborators, before starting to work on this. @rwjblue @Turbo87 @tylerturdenpants Your thoughts?

Turbo87 commented 4 years ago

I would suggest --telemetry=http://localhost:4200 to simplify the CLI options, but I generally agree that the telemetry tends to be a bit finicky and that it makes sense to have this codemod also run reasonably well if telemetry is not available.

rwjblue commented 4 years ago

Ya, agree, we just need to nail down what the actual semantics should be (so that we fallback to doing something that is still safe and useful).

Turbo87 commented 4 years ago

@rwjblue at some point this codemod didn't use telemetry yet, maybe we should go back to that state if telemetry is not available?

rwjblue commented 4 years ago

Yep, I agree I just want to be clear about what features are telemetry only (documented in the README) and ensure that the guards throughout the code are clear.