www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - trash-d version 15

reply rushsteve1 <rushsteve1 rushsteve1.us> writes:
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!
Mar 08 2022
parent reply meta <meta gmail.com> writes:
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?
Mar 08 2022
parent reply rushsteve1 <rushsteve1 rushsteve1.us> writes:
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](https://dlang.org/spec/module.html) 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!
Mar 08 2022
parent reply Adam D Ruppe <destructionator gmail.com> writes:
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.)
Mar 08 2022
next sibling parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
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
Mar 08 2022
prev sibling parent reply rushsteve1 <rushsteve1 rushsteve1.us> writes:
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](https://github.com/rushsteve1/trash-d/commit/6e4fd07f209d2b001e9ff6033dc21245fb6ad38d).
Mar 12 2022
parent Brian Callahan <bcallah openbsd.org> writes:
Thanks for the utility. I've been using it for a while and it 
works great on my MATE desktop.

~Brian
Mar 12 2022