mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[GH-ISSUE #230] Can't create custom (third-party) widget due to 'internal' package #125
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#125
Loading…
Add table
Add a link
Reference in a new issue
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?
Originally created by @kvnxiao on GitHub (Apr 8, 2020).
Original GitHub issue: https://github.com/mum4k/termdash/issues/230
Originally assigned to: @mum4k on GitHub.
Hi @mum4k , it's me again,
I've been using this library for my project pretty well so far, but I seem to have stumbled upon an issue where I cannot create a third-party custom widget that implements the
widgetapi.Widgetinterface becausecanvas(and some other draw functions) are part of an internal package. This leads to Go complaining aboutuse of internal package not alloweduse of internal package not allowed.This prevents me from creating a new custom widget that satisfies my requirements unless I manually fork the repository and add my custom widget into the termdash project's source.
Am I approaching this the wrong way?
Maybe this would be a good thing to clarify / address together with https://github.com/mum4k/termdash/issues/228 for the next release?
@mum4k commented on GitHub (Apr 8, 2020):
Hello again @kvnxiao. You raise a good point, in retrospect choosing "internal" as a directory name was unfortunate. It definitely is a goal or Termdash to allow users to implement their own third-party widgets.
The goal was (and is) to indicate that certain API surface of Termdash won't carry backward compatibility guarantee. Specifically the internal helpers won't - they may change at any time to prevent restricting any internal development efforts. If users want guaranteed compatibility on their widgets, the best approach might be to push the widgets upstream into Termdash.
What we can do is rename that directory from "internal" to "private" and clarify the meaning in the main README. I agree that we can release this together with the Go modules, we can release the next version right when this gets in.
Do you want to send a PR renaming the directory from "internal" to "private" in the devel branch, or would you prefer if I take care of this?
@kvnxiao commented on GitHub (Apr 8, 2020):
I think a change involving package renaming would be easier to do from your side so that we don't have to go through the PR process over github 😛
@mum4k commented on GitHub (Apr 9, 2020):
I think that is a fair assessment. Sounds good, I will make the change and push a release shortly.
@mum4k commented on GitHub (Apr 10, 2020):
This should be all done and pushed to master, please let me know if you encounter any further issues.