Closed apsavin closed 8 years ago
@veged ? @narqo ?
My opinion there's nothing wrong about fixing wrong decisions that were implemented centaurs ago. I don't understand what kind of consistency with BEMHTML you're talking about.
I think promises gives you ability to make all kinds of decisions you've listed. You still can use bemtree.apply().always(/* i don't give a fck about errors */)
don't you?
My opinion there's nothing wrong about fixing wrong decisions that were implemented
Exactly what I'm talking about.
Of course, users can now ignore errors or handle them.
I just don't like the way how and I think we can change it before release.
The main thought is: "strict" option and BEMTREE.apply().then(onF, onR)
is better then BEMTREE.apply().spread(function(bemjson, promise){ return promise.done(function (){onF(bemjson);}, onR);})
.
Oh, now I see. I was absolutely sure that we already have such strict behaviour in v3
. We need to drop this spread
requirements from v3
, and start using normal promises there. No additional options are needed.
speaking about v3
we can do such API changes — :+1:
we just need to ensure about documentation in changelog
Let's move all discussions about BEMTREE and BEMHTML to https://github.com/bem/bem-xjst/issues
Guys, we've changed api of BEMTREE in 3.0 because I wanted to handle errors. I think, we should restore it back before official publication of 3.0.
Why?
How?
We should implement some option like
strict: true
. It may be false by default.What do you think about this proposal? If you agree, can you suggest me the way how to implement such option?