nbdkit rust plugin: copyright notices, Cargo workspace, and macro hygiene
I pushed 2 & 3, thanks. But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed versions of the nbdkit crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..f50a66b7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["plugins/rust"]
Is it really absolutely necessary to have this in the top level directory of the source tree? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
On Wed, Jun 17, 2020 at 12:23:12PM +0100, Richard W.M. Jones wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed versions of the nbdkit crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..f50a66b7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["plugins/rust"]
Is it really absolutely necessary to have this in the top level directory of the source tree?
These seem to be relevant: https://stackoverflow.com/questions/46786956/can-i-add-a-dependent-crate-tha... which refers to: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html It seems like cargo should pick up the Cargo.toml file from plugins/rust automatically? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
On 6/17/20 6:23 AM, Richard W.M. Jones wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed
unreleased
versions of the nbdkit crate.
As a meta-comment, it's easier to review patches sent inline, one patch per email, rather than multiple patches as opaque attachments to one email; the difference being that I can immediately reply to the patch in my mailer without having to open a file and pasting contents. git send-email makes it easy to send patch series in this way, if you want to figure out how to set that up. But it's not a showstopper if you keep your current workflow for submitting patches. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
On Wed, Jun 17, 2020 at 7:33 AM Eric Blake <eblake@redhat.com> wrote:
On 6/17/20 6:23 AM, Richard W.M. Jones wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed
unreleased
versions of the nbdkit crate.
As a meta-comment, it's easier to review patches sent inline, one patch per email, rather than multiple patches as opaque attachments to one email; the difference being that I can immediately reply to the patch in my mailer without having to open a file and pasting contents. git send-email makes it easy to send patch series in this way, if you want to figure out how to set that up. But it's not a showstopper if you keep your current workflow for submitting patches.
As a meta-comment, it would be a lot easier to review patches if you would accept PRs. If you're wary of Github's closed-source nature, why not Gitlab? It's easy to move a project from github to gitlab, and its PR system is in some ways even better. Personally, I don't think Github offers very much value at all if you eschew PRs. -Alan
On Wed, Jun 17, 2020 at 08:38:30AM -0600, alan somers wrote:
On Wed, Jun 17, 2020 at 7:33 AM Eric Blake <eblake@redhat.com> wrote:
On 6/17/20 6:23 AM, Richard W.M. Jones wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed
unreleased
versions of the nbdkit crate.
As a meta-comment, it's easier to review patches sent inline, one patch per email, rather than multiple patches as opaque attachments to one email; the difference being that I can immediately reply to the patch in my mailer without having to open a file and pasting contents. git send-email makes it easy to send patch series in this way, if you want to figure out how to set that up. But it's not a showstopper if you keep your current workflow for submitting patches.
As a meta-comment, it would be a lot easier to review patches if you would accept PRs. If you're wary of Github's closed-source nature, why not Gitlab? It's easy to move a project from github to gitlab, and its PR system is in some ways even better. Personally, I don't think Github offers very much value at all if you eschew PRs.
I don't think PRs are a good way to review, and until I can open and edit one in emacs from the command line I don't think that's likely to change for me. However we are indeed looking at gitlab, although we're planning to wait a little while to see how it works for the libvirt team first. Libvirt team moved to gitlab only a couple of months ago. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Wed, Jun 17, 2020 at 03:52:22PM +0100, Richard W.M. Jones wrote:
I don't think PRs are a good way to review, and until I can open and edit one in emacs from the command line I don't think that's likely to change for me.
BTW Dan Berrange is developing something for this: https://gitlab.com/bichon-project/bichon Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
On Wed, Jun 17, 2020 at 5:23 AM Richard W.M. Jones <rjones@redhat.com> wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed versions of the nbdkit crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..f50a66b7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["plugins/rust"]
Is it really absolutely necessary to have this in the top level directory of the source tree?
Rich.
Turns out it isn't. It didn't work when I tried it the first time, and I thought that this was the reason why. But it turns out the real reason was because you had been generating your Cargo.toml file with autotools. That's no longer the case, after my last patch. So you don't need the workspace Cargo.toml file after all. -Alan
On Wed, Jun 17, 2020 at 08:42:19AM -0600, alan somers wrote:
On Wed, Jun 17, 2020 at 5:23 AM Richard W.M. Jones <rjones@redhat.com> wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed versions of the nbdkit crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..f50a66b7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["plugins/rust"]
Is it really absolutely necessary to have this in the top level directory of the source tree?
Rich.
Turns out it isn't. It didn't work when I tried it the first time, and I thought that this was the reason why. But it turns out the real reason was because you had been generating your Cargo.toml file with autotools. That's no longer the case, after my last patch. So you don't need the workspace Cargo.toml file after all.
OK, thanks for checking that. If we did need to generate Cargo.toml again in future (eg. to include the nbdkit version number) then we might include the generated file into git, if that helps. In other projects we have included selected generated files in git for various reasons. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
On Wed, Jun 17, 2020 at 8:54 AM Richard W.M. Jones <rjones@redhat.com> wrote:
On Wed, Jun 17, 2020 at 08:42:19AM -0600, alan somers wrote:
On Wed, Jun 17, 2020 at 5:23 AM Richard W.M. Jones <rjones@redhat.com> wrote:
I pushed 2 & 3, thanks.
But ...
From 9fa3e443467e3c06761ec54241327e8daf8701ca Mon Sep 17 00:00:00 2001 From: Alan Somers <asomers@gmail.com> Date: Mon, 15 Jun 2020 16:59:53 -0600 Subject: [PATCH 1/3] Add a Cargo.toml file to the top-level directory
This is necessary for other Rust projects to depend on unrelesed versions of the nbdkit crate. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..f50a66b7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["plugins/rust"]
Is it really absolutely necessary to have this in the top level directory of the source tree?
Rich.
Turns out it isn't. It didn't work when I tried it the first time, and I thought that this was the reason why. But it turns out the real reason was because you had been generating your Cargo.toml file with autotools. That's no longer the case, after my last patch. So you don't need the workspace Cargo.toml file after all.
OK, thanks for checking that.
If we did need to generate Cargo.toml again in future (eg. to include the nbdkit version number) then we might include the generated file into git, if that helps. In other projects we have included selected generated files in git for various reasons.
Rich.
Yeah, that would work.
participants (3)
-
alan somers -
Eric Blake -
Richard W.M. Jones