Skip to content

Create go.mod#57

Open
XieJiSS wants to merge 1 commit intoBurntSushi:masterfrom
XieJiSS:patch-1
Open

Create go.mod#57
XieJiSS wants to merge 1 commit intoBurntSushi:masterfrom
XieJiSS:patch-1

Conversation

@XieJiSS
Copy link
Copy Markdown

@XieJiSS XieJiSS commented Feb 12, 2022

Without a go.mod, the build fails with error:

go: go.mod file not found in current directory or any parent directory; see 'go help modules'
go: go.mod file not found in current directory or any parent directory; see 'go help modules'

Note that since go 1.16, the go command will build packages in module-aware mode by default, see: https://go.dev/blog/go116-module-changes#modules-on-by-default

@jezek
Copy link
Copy Markdown

jezek commented Feb 12, 2022

  1. https://github.com/BurntSushi/xgb/blob/master/README#L1-L3

    Note that this project is largely unmaintained as I don't have the time to do
    or support more development. Please consider using this fork instead:
    https://github.com/jezek/xgb

  2. https://github.com/golang/go/wiki/Modules#releasing-modules-all-versions

    Ensure your go.sum file is committed along with your go.mod file

    Edit: go.sum is not generated, because of no external dependencies

Note: The https://github.com/jezek/xgb repository hasn't the go.[mod,sum] files either, but I can add your commit If you want.

@XieJiSS
Copy link
Copy Markdown
Author

XieJiSS commented Feb 15, 2022

Hi @jezek , is your fork compatible with BurntSushi's fork? The Arch Linux repo is maintaining a package which currently uses this fork as upstream. Maybe I can file an issue to request changing the source to your fork?

Arch's build system does require a go.mod to build the package though, as they are using go>=1.16.

@jezek
Copy link
Copy Markdown

jezek commented Feb 16, 2022

@XieJiSS Yes, my fork is fully compatible.

I've only forked and added a memory leak fix + some tests (Edit: also some examples were merged).

I've added a go.mod file a few moments ago.

@XieJiSS
Copy link
Copy Markdown
Author

XieJiSS commented Feb 18, 2022

Hi @jezek, FYI I've created a bug report for Arch Linux at https://bugs.archlinux.org/task/73754. For packaging purpose you may need to add a release or tag in your repo, would that be fine? Thanks!

@jezek
Copy link
Copy Markdown

jezek commented Feb 19, 2022

@XieJiSS I've decided on release tag v1.0.0, I hope, it's OK.

@tobyweb3x
Copy link
Copy Markdown

@jezek I want to use the xgbutils, which is based on the xgb, does that mean the fixes you made in your repo are still a problem in the xgbutil?

@tobyweb3x
Copy link
Copy Markdown

@BurntSushi
#57 (comment)

@jezek I want to use the xgbutils, which is based on the xgb, does that mean the fixes you made in your repo are still a problem in the xgbutil?

@BurntSushi

@jezek
Copy link
Copy Markdown

jezek commented Feb 16, 2024

@tobigiwa Yes, the fixes I made to my fork of jezek/xgb, are not populated to BurntSushi/xgbutil, cause it imports BurntSushi/xgb.

You can (one of these):

  • clone the BurntSushi/xgbutil repo and change all the imports to jezek/xgb
  • clone the BurntSushi/xgbutil repo, add a go.mod file and use go replace to change the source of xgb
  • Use jezek/xgbutil. It's a fork of BurntSushi/xgbutil with all the imports changed to jezek/xgb
  • Try something else.

@tobyweb3x
Copy link
Copy Markdown

tobyweb3x commented Feb 16, 2024

Ooh... I didn't know you had a fork of xgbutil, that's what I'll be doing. Thanks.

@tobyweb3x
Copy link
Copy Markdown

@jezek I'm currently working on a project with X11, might if I disturb you a bit with questions...?
PLEASE...🙏🏿🙏🏿🙏🏿
PLEASE...🙏🏿🙏🏿🙏🏿
PLEASE...🙏🏿🙏🏿🙏🏿
PLEASE...🙏🏿🙏🏿🙏🏿
PLEASE...🙏🏿🙏🏿🙏🏿

@jezek
Copy link
Copy Markdown

jezek commented Feb 16, 2024

@jezek I'm currently working on a project with X11, might if I disturb you a bit with questions...?

I don't know the workings of xgbutil. I used only xgb a long time ago to spawn a window with an image (and some other stuff), found a bug, made a PR. It was not accepted (too many chages), so I forked and used it for my side project. It was a long time ago and I don't remember much. I'm afraid I won't be any help for you. Have fun figuring it out. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants