noDeps cancels dependencies on lower redefinition levels, preserving them only to the level the noDeps property is defined upon

But what is lower level of definition?

Is is works this way? A mustDeps B + A noDeps C + B mustDeps C = A B?

Or it should only affect levels, but not inheritance in same level of definitions?

Sergey Berezhnoy

@veged

noDeps cancel dependencies — it means that A mustDeps B + A noDeps B = A

more real example — if you have library with some dependency between particular two blocks you can delete it (exactly) on your project level throughout noDeps

so noDeps doesn't mean that you "delete block from result" but means that you "remove particular dependency link between particular blocks" (actually it's work not only for block but for any BEM-entities: blocks, elems, modifiers)

Vsevolod Strukchinsky

@floatdrop

Why documentation mentions lower redifinition level?

Sergey Berezhnoy

@veged

it means lower in order of build: usually you have something like "core lib", "project level", "page level"

so the page level is lowest one and so on

but you can also use noDeps in same level — they will have top most priority among mustDeps/shouldDeps

Vladimir Starkov

@iamstarkov

now I don't understand noDeps at all.

Sergey Berezhnoy

@veged

it's much more ease then you can think about :-) it's just a rollback for particular dependency declaration — if you decl A->B you can later say "no, cancel deps A->B" — thats it!

Vladimir Starkov

@iamstarkov

at build bem tools have graph of blocks with should and must connections to other blocks in graph. So if block1 connect to block2 with should or must connection, then if block2 have block1 in noDeps then all block1's connections to block2 cancelled?

Sergey Berezhnoy

@veged

and do not take in mind any levels stuff — it gonna be intuitive if you start to decl what you want

Vladimir Starkov

@iamstarkov

am i right with prev question?

Sergey Berezhnoy

@veged

if b2 have noDeps to b1 it doesn't affect any b1 deps b2

Vsevolod Strukchinsky

@floatdrop

does it affects dependencies in upper levels of declaration (for example bem-core)?