Yang, Bo

Results 420 comments of Yang, Bo

> I like the idea of making devenv more pure but I would avoid putting necessary steps into the `.envrc` file. This way direnv becomes a dependency, currently it's just...

@domenkozar Potentially `devenv.yaml` based projects could also utilize the `.devenv/state/pwd` file to avoid `--no-pure-eval`, but it is out of the scope of this PR.

Name clash happens when macro X generate some calls to macro Y, and X and Y use the same prefix for `freshName`. For example, `x` and `a` are common prefixes...

On Linux, I got the error message when running `nix build`: ``` evaluating derivation 'git+file:///home/twer/14af26cf2e7e85559bbd43ef36584be7#packages.x86_64-linux.default'error: stack overflow (possible infinite recursion) ```

> Can you give the real world example demonstrating why you are wrapping the type object? I am building a recording/replaying testing framework (similar to https://vcrpy.readthedocs.io/) to monkey patch classes...

`issubclass(proxy := wrapt.BaseObjectProxy(enum.StrEnum), enum.StrEnum)` -> triggers `proxy.__bases__`, which does not include `StrEnum`, thus returning `False`. The reason is that it actually triggers `StrEnum.__subclasscheck__`, not `proxy.__subclasscheck__` and `StrEnum.__subclasscheck__` internally accesses `proxy.__bases__`...

I think `issubclass(wrapt.BaseObjectProxy(enum.StrEnum),enum.StrEnum)` returning `False` might be an accepted behavior. Supposing in tests, you do monkey patching: ``` my_lib.MyClass = MyProxy(my_lib.MyClass) ``` Then the original `my_lib.MyClass` should become inaccessible from...

`issubclass(enum.StrEnum, proxy := wrapt.BaseObjectProxy(enum.StrEnum))` triggers `proxy.__subclasscheck__`, the instance method, because `BaseObjectProxy` is now the metaclass of the `proxy` if you consider `proxy` itself as a type. However currently `BaseObjectProxy` does...

We now have partitions. Putting `assertions` in the separate test partition seems the best solution.

I see. Settings `assertions` for individual packages makes more since. https://github.com/nix-community/dream2nix/blob/b76c529f377100516c40c5b6e239a4525fdcabe0/modules/dream2nix/core/assertions.nix#L4