-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xeus-zmq: init at 1.1.0 #244775
xeus-zmq: init at 1.1.0 #244775
Conversation
meta = with lib; { | ||
description = "ZeroMQ-based middleware for xeus"; | ||
homepage = "https://github.com/jupyter-xeus/xeus-zmq"; | ||
maintainers = with maintainers; [ thomasjm ]; | ||
platforms = platforms.all; | ||
license = licenses.bsd3; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta = with lib; { | |
description = "ZeroMQ-based middleware for xeus"; | |
homepage = "https://github.com/jupyter-xeus/xeus-zmq"; | |
maintainers = with maintainers; [ thomasjm ]; | |
platforms = platforms.all; | |
license = licenses.bsd3; | |
}; | |
meta = { | |
description = "ZeroMQ-based middleware for xeus"; | |
homepage = "https://github.com/jupyter-xeus/xeus-zmq"; | |
license = lib.licenses.bsd3; | |
maintainers = with lib.maintainers; [ thomasjm ]; | |
platforms = lib.platforms.all; | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question again -- I've gotten the opposite feedback in a prior review, to use a with lib
block. Doing some grepping, the way I've done it here seems to be almost universally how the rest of Nixpkgs does it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit more technical:
with lib
acts like #include <stdlib>
in C, bringing all elements of it into the scope and introducing complications on static analysis and many other things.
Also, the nesting of with
s brings some nasty inconsistencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are fine and using with lib here is fine. There is no need to change packages over and it is definitely not something blocking a merge.
Thanks for the review! I updated the hash, but had a few questions about the style changes. |
Thanks for explaining @AndersonTorres ! I appreciate the review, and I'll make these changes if you insist. But I'd like to lodge a slight protest at this way of effecting change. I've been in this situation before:
This has the effect that the PR gets landed and is "weird" and at odds with the large previously existing codebase. And yet it doesn't actually save any work in the long term, since at some point someone will have to do things the "right way" by doing a full treewide change, presumably by automated means. And who knows, maybe the community will not end up adopting the practice and we'll have introduced divergence into the codebase for nothing. I say all this without making any comment on the specific merits of the proposals, though of course they're debatable. And I salute efforts to improve the codebase. I just think it's better for new code to favor consistency with existing code and for new practices to be introduced via a proper process. |
Without entering the merits of the proposals, your protest would have some merit for "syntatic sugar" parts - namely, things like indentation and one-element-per-line listings. They do not change the AST (abstract syntax tree). However, Indeed, I have given a NixOS-blessed reference about this issue: https://nix.dev/recipes/best-practices#with-scopes For completion, here is a more technical post about the hurdles of https://www.tweag.io/blog/2023-01-24-nix-with-with-nickel/ The examples are instructive. |
I definitely don't see why "syntactic sugar"-ness should be a great proxy for "amenable to automation"-ness. I did not know that nix.dev had become officially blessed, so thanks for the clarification. I have no doubt that the proposed best practice is a great idea! But that doesn't really change the objection. What good is it for new PRs to avoid relatively innocuous uses of Anyway, I've made the changes, thanks for working through this with me :) |
Syntatic sugar is (usually) easier to automate because its evaluation is simpler, not requiring the full power of an evaluator. Sometimes it can be executed via macro substitution (similar to On the other hand, the
Nickel is just an example of real world case use. It is not the kernel of the argument. What I was pointing out is that I can live with
If.
That's fine. This will be useful as a reference in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
editorconfig is now complaining about ghosts trailing whitespaces.
Clean up them and ping me tomorrow to merge.
Fixed whitespace and squashed, thanks @AndersonTorres ! |
Yes but the using |
I am being more radical: In this sense, a rule with no margin for exceptions (never use nested with, never use global with) are easy to follow and easy to reason about. |
Description of changes
Add the
xeus-zmq
library.This is the first step of packaging
xeus-cling
, the Jupyter kernel for C++. See the draft PR #244777.Opening this per discussion in the QuantStack/Lobby room. Any chance you could review @serge-sans-paille ?
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)