Thread overview
trash-d version 15
Mar 08, 2022
rushsteve1
Mar 08, 2022
meta
Mar 08, 2022
rushsteve1
Mar 08, 2022
Adam D Ruppe
Mar 08, 2022
Ali Çehreli
Mar 12, 2022
rushsteve1
Mar 13, 2022
Brian Callahan
March 08, 2022

Hello! I thought I would give an update on trash-d, the utility that I've been writing in D for the last several months.
https://github.com/rushsteve1/trash-d

Previous announcement thread:
https://forum.dlang.org/thread/onpukmibdjhtwwsvarat@forum.dlang.org

Since my last post there have been a number of new releases, the latest being version 15 which I tagged yesterday. trash-d can now handle cross-device trashing, report orphaned files in the trash, presents info as nicer tables, and there are now DEB and RPM packages built by CI. And a whole host of bugfixes and smaller features, as well as a pretty solid test set with about 85% coverage.

I'm still a bit of a D novice, so any feedback or suggestions (or PRs) are highly appreciated!

March 08, 2022

On Tuesday, 8 March 2022 at 14:29:07 UTC, rushsteve1 wrote:

>

Hello! I thought I would give an update on trash-d, the utility that I've been writing in D for the last several months.
https://github.com/rushsteve1/trash-d

Previous announcement thread:
https://forum.dlang.org/thread/onpukmibdjhtwwsvarat@forum.dlang.org

Since my last post there have been a number of new releases, the latest being version 15 which I tagged yesterday. trash-d can now handle cross-device trashing, report orphaned files in the trash, presents info as nicer tables, and there are now DEB and RPM packages built by CI. And a whole host of bugfixes and smaller features, as well as a pretty solid test set with about 85% coverage.

I'm still a bit of a D novice, so any feedback or suggestions (or PRs) are highly appreciated!

That's a very nice project, thanks for sharing, the code is very clean and easy to read, well done!

The only note I can make so far is the lack of proper modules module x;

I'm surprised you could import other files without it, is it common practice to ignore that rule when everything is top level?

March 08, 2022

On Tuesday, 8 March 2022 at 15:51:53 UTC, meta wrote:

>

That's a very nice project, thanks for sharing, the code is very clean and easy to read, well done!

Thanks!

>

The only note I can make so far is the lack of proper modules module x;

I'm surprised you could import other files without it, is it common practice to ignore that rule when everything is top level?

According to the module documentation you can omit the module x; and it will implicitly be the file name.

I have no idea if it's common or good practice. In trash-d I sort of get around it by importing functions directly with the import foo : bar; style, so I generally avoid conflicts that way.

Of course I might be doing something wrong :). If I am, someone let me know!

March 08, 2022
On Tuesday, 8 March 2022 at 16:19:13 UTC, rushsteve1 wrote:
> According to [the module documentation](https://dlang.org/spec/module.html) you can omit the `module x;` and it will implicitly be the file name.

This is pretty flaky, I'd strongly recommend that for any module ever imported, use the explicit module definition, and use at last two names: `module mystuff.bar;` instead of `module bar;`, so there's lesser odds of a conflict with other libs out there (remember, the module namespace is superglobal across the whole end-user project, not just your own repo.)

March 08, 2022
On 3/8/22 08:25, Adam D Ruppe wrote:

> use at last two names: `module mystuff.bar;` instead of `module bar;`,

I strongly agree.

Ali

March 12, 2022

On Tuesday, 8 March 2022 at 16:25:44 UTC, Adam D Ruppe wrote:

>

This is pretty flaky, I'd strongly recommend that for any module ever imported, use the explicit module definition, and use at last two names: module mystuff.bar; instead of module bar;

Thanks for the advice! I've added explicit modules in the latest commit.

March 13, 2022

Thanks for the utility. I've been using it for a while and it works great on my MATE desktop.

~Brian