exercism / elm-analyzer

GNU Affero General Public License v3.0
1 stars 4 forks source link

Proposal for tagging mechanism #79

Closed jiegillet closed 10 months ago

jiegillet commented 11 months ago

Dear @mpizenberg, @ceddlyburge and @ErikSchierboom,

Following our (fun and productive) discussion about tags, I came up with a prototype for the tagging mechanism, using elm-review's data extractors, which seems like a perfect fit, I have been able to add some tags very quickly.

Some comments:

I'd be happy to hear feedback about any of it.

mpizenberg commented 11 months ago

This sounds like a solid starting point for all things that do not need more-than-one-node analysis! I was wondering if uses:prefix-operator could be a tag? seems like something we might want to know (and forbid ahah, at least for operators that are not symmetric).

jiegillet commented 11 months ago

An alternative would be to don't yet output the tags.json file and put it behind a feature flag. Ideally we would not have to re-run the analyzer on all solutions multiple times.

@ErikSchierboom How would a feature flag work?

This sounds like a solid starting point for all things that do not need more-than-one-node analysis! I was wondering if uses:prefix-operator could be a tag? seems like something we might want to know (and forbid ahah, at least for operators that are not symmetric).

I actually added that very tag on the spreadsheet, but I forgot to include it in the code :)

jiegillet commented 11 months ago

Thank you for the feedback so far. I made some changes and I added a bunch of tags, but it's still WIP. Could I ask for your help on some of the decisions? On the spreadsheet I marked some questions in orange wherever I couldn't make a clear decision, please add some decisive comments on there so we can make progress :)

ErikSchierboom commented 11 months ago

Ideally do a canary release, just using it for a small subset of solutions (maybe just solutions done by the maintainters or something like that). Not sure how easy / possible this is from an exercism point of view though.

We don't yet have anything like this and I wouldnt' really want to start adding exceptions, sorry.

Maybe have some monitoring / logging for a while at the start, so we can keep an eye on it. Not sure what this would entail, maybe it could use the AI tags as well and flag if anything is very different or something like that. Not totally sure this is worth it, but would provide more confidence.

This sounds somewhat complicated. Personally, having a nice set of smoke tests should give us enough confidence that this is working.

ErikSchierboom commented 11 months ago

@ErikSchierboom How would a feature flag work?

Well, the thing I would like to enable is for you all to continue working on adding more tags whilst still having CI verify the tags output. So maybe a docker build arg that is off by default?

jiegillet commented 10 months ago

I know I won't have a lot of free time in the next few weeks, so I'll stop working on this PR further and submit it as it is, it's already very big anyway. Some notes: