Archived
6
52
Fork
You've already forked fjo
3

Partial rewrite tracker #50

Open
opened 2025年04月25日 07:12:21 +02:00 by noth · 4 comments
Owner
Copy link

After working on this for quite a bit of time last year, I've realized that this needs at least a partial rewrite and restructure.

TBD:

  • restructure cli
  • update forgejo-sdk
After working on this for quite a bit of time last year, I've realized that this needs at least a partial rewrite and restructure. TBD: - [ ] restructure cli - [ ] update forgejo-sdk

I've realized that this needs a rewrite, desperately.

Two questions:

  • Why this deperately needs a rewrite?
  • What's wrong with the current codebase?

And a question:

  • How can I help with the rewrite process?
> I've realized that this needs a rewrite, desperately. Two questions: - Why this *deperately* needs a rewrite? - What's wrong with the current codebase? And a question: - How can I help with the rewrite process?

@baskoro This project is practically discontinued, it used to be a place to experiment on top of https://codeberg.org/Aviac/codeberg-cli, but I would advise against spending any effort here

@baskoro This project is practically discontinued, it used to be a place to experiment on top of https://codeberg.org/Aviac/codeberg-cli, but I would advise against spending any effort here
Author
Owner
Copy link

Even though this used to be a playground for experimentation, I still would like to at least try to revive it.

A few reasons for a rewrite (a partial one, not from scratch) and a restructure:

  • The current code relies on forgejo_sdk, which is actually and totally discontinued. I'd switch to forgejo-api by Cyborus, which is much better.
  • The current code is disorganized, like having a cli folder and then additional pr and repo folders, with all of them containing both the cli structs and the implementation.
  • I saw a lot of room for improvement in validation (like in auth::login, where there's first a split_whitespace then collect to vec then a length check on that vec, and then there's also a length check on the string. all of this can be !s.contains(" ") && s.len() == 40)
  • I saw a lot of room for improvement in UX, particularly at points where stuff like spin_until_ready is used, which just creates a spinner, without an option for a message.

To be honest, I did go a bit overboard in the issue message, but in truth I just want this to be a useful tool, and have good UX and also good DX.

Good DX especially means (in the context of a CLI tool) that you can quickly find, without the knowledge of the codebase itself, where a given command is implemented, and I don't think that in the current state of the codebase, it'd be easy and quick to locate a command's implementation.

Going forward, I'd like to ask a question:
where would you put the CLI structs and where you would put the command implementations. Also, there is an option to colocate them, which could also be viable. But that is up for further debate.

Even though this _used_ to be a playground for experimentation, I still would like to at least try to revive it. A few reasons for a rewrite (a partial one, not from scratch) and a restructure: - The current code relies on forgejo_sdk, which is actually and totally discontinued. I'd switch to forgejo-api by Cyborus, which is much better. - The current code is disorganized, like having a cli folder and then additional pr and repo folders, with all of them containing both the cli structs and the implementation. - I saw a lot of room for improvement in validation (like in auth::login, where there's first a split_whitespace then collect to vec then a length check on that vec, and then there's also a length check on the string. all of this can be `!s.contains(" ") && s.len() == 40`) - I saw a lot of room for improvement in UX, particularly at points where stuff like `spin_until_ready` is used, which just creates a spinner, without an option for a message. To be honest, I did go a bit overboard in the issue message, but in truth I just want this to be a useful tool, and have good UX and also good DX. Good DX especially means (in the context of a CLI tool) that you can quickly find, without the knowledge of the codebase itself, where a given command is implemented, and I don't think that in the current state of the codebase, it'd be easy and quick to locate a command's implementation. Going forward, I'd like to ask a question: where would _you_ put the CLI structs and where you would put the command implementations. Also, there is an option to colocate them, which could also be viable. But that is up for further debate.
noth changed title from (削除) This needs a rewrite. (削除ここまで) to Partial rewrite tracker 2025年06月13日 10:55:35 +02:00
Author
Owner
Copy link

If you want to help contribute you can just fix bugs, since I am not currently able to write code, I am no help to the rewrite

If you want to help contribute you can just fix bugs, since I am not currently able to write code, I am no help to the rewrite
Commenting is not possible because the repository is archived.
No Branch/Tag specified
main
next
pre-fjo-rewrite
v0.3.5
v0.3.4
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
VoiDD/fjo#50
Reference in a new issue
VoiDD/fjo
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?