"poetry version" command is duplicating code in pyproject.toml - python-poetry

I'm using poetry version minor to increment the version of my package. I thought that was all it did, but it's modifying the rest of my pyproject.toml
Specifically it's
moving build-system within the file
duplicating 2 sets of tool.poetry.plugins
Any idea what I'm doing wrong here?
Thanks!

The fix was to move the [build-system] into the location in the pyproject it was being auto-moved to and then the duplication stopped.
Why this fixed it is still a mystery. If someone wants to elaborate why this is the case I'll mark that as the answer, otherwise I'll close this.
Here's a very limited github discussion

Related

vscode: Move Go code (type/function) to other file

How to move a function/type from one Go file to an other Go file in vscode?
... and the IDE should update all usages of the moved function/type ...
In the past I used Python and PyCharm, and it supported this kind of refactoring.
It seems that this feature (the move-refactoring) hasn't been implemented in VSCode yet. The only workaround that just came into my mind is this.
You can use the cmd gomvpkg to move a package to a new one. Thanks to this, if you have only the function within the file you should be good to go. It should also update the import statements (make sure to double-check them anyway). I know that it's boring in fact I keep copying/pasting functions between packages as it's faster.
It seems that this feature is already supported in Goland, so you can give it a try maybe if you wish.
Let me know!

Update libraries after manual change

So I started working on my first open-source contribution in ruby. There I have the library I'm working on in the /lib/ folder. Now when I tried changing the code, my program (which uses the library) still uses the old code.
For example: Broke a function on purpose by deleting its end keyword (which should be causing an immediate crash), but it kept working perfectly after I did.
Another example was changing the code in such a way it should still work (mutating the output string) but it still returned the old string.
user~$ bin/ruby-hyphen -V "this is a test sentence"
this is a test sen-tence
Does anyone know if I have to tell the runtime to refresh it or something along those lines?
I found out why that happened. The file has a *.gemspec, which made it act as if it was a gem. To see the changes I needed to enter:
gem build *.gemspec
bundle exec rake install
Or, if you want to develop quicker: change everywhere you require it into a require_relative. That should also fix it. I hope this question helps someone in the future!

Issue with using a modified version of a Go dependency

So here is the situation:
I have a fork of go-ipfs. It depends on go-ipfs-config. I need to modify go-ipfs-config and make go-ipfs depend on my modified version.
I forked the go-ipfs-config made my changes and made sure to update the path to be that of my forked version as can be seen here. I confirmed that this still builds successfully by running go build
Then I updated go.mod in go-ipfs to use my modified version. I used the replace directive to signify this intention which can be seen here
This is where things gets absolutely bunkers and I am no longer sure what is going on.
When i do go mod tidy to fetch the dependency i get the following output:
go: finding module for package github.com/dadepo/go-ipfs-config
go: found github.com/dadepo/go-ipfs-config in github.com/dadepo/go-ipfs-config v0.5.3
The crazy thing is that v0.5.3 does not exist in github.com/dadepo/go-ipfs-config!
Also the following line get added to go.mod :
github.com/dadepo/go-ipfs-config v0.5.3 // indirect
Which can even be seen here
I have run commands like go clean -modcache and go clean -r etc but does not seem to fix things!
Does anybody know what I am doing wrong? And also how to achieve the goal of making my version of a project depend on another modified version of its dependency?
Ok, so this is as a result of me not being aware of couple of things going on in the Go lang toolchain.
Apparently https://proxy.golang.org is a thing! It is a service operated by google that caches modules. So If you made a release, deleted it, chances are that the version is already cached in https://proxy.golang.org. This was exactly what happened in my case. I had made a 0.5.3 release, deleted it, but it is not really gone as the Google cache already got a hold of it.
So in case you are seeing versions that should not exist. This should be the first place you check. This documentation link also sheds some more light on the proxy and how it can be tweaked.
I found this out based on the conversation I had on the issue I opened reporting this behaviour. If you are curious, you can check it out here.

Something wrong with libpng on biicode?

I've been using libpng from biicode for quite some time now. Just today, I have started receiving this error:
Cannot open include file: 'pnglibconf.h': No such file or directory
I have noticed on biicode (http://www.biicode.com/glenn/png) that the specific file is listed as _pnglibconf.h. I don't know if this is a recent change or if it has always been the case. Does someone know if the block has been modified in some way (it is still stable version 0) and if it needs to be corrected or if it can be made to work as it is somehow?
Thanks!
Biicode's "_pnglibconf.h" should be "pnglibconf.h". I don't know why there is a leading underscore. Also it is out of date; it's from libpng-1.5.10 not 1.6.10, according to the comment within it. Try copying scripts/pnglibconf.h_prebuilt to pnglibconf.h

How to upgrade a package in Mathematica?

If I have a package installed, that has built-in documentation, and I want to install an updated version of the same package, is it safe just to erase the old version folder?
Last time I tried, I got some error messages on the documentation, but never understood if the problem came from this fact. Is there an “uninstall package” procedure?
Thank you,
Pedro
If the package has an installer, you should see if it has a corresponding uninstall mode. Otherwise, simple deletion should be safe.
If you do run into any errors, feel free to update your question.

Resources