-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird error piping to >NUL #6039
Comments
There was a similar issue related to stderr here #6021 |
@djdv can you add the appropriate error to https://github.com/ipfs/go-ipfs-cmds/error_windows.go (or maybe add some way to detect this?). |
Sorry for the late response and thank you for acknowledging this issue. |
@LetItGlow |
Heads up. Aside from this IPFS version executing incredible fast, it outputs flawless for now. This:
used like this:
Got the expected result. I gonna keep this dev-version for now, although I think I can't use it for bugreports, as it's an unofficial build? |
Yay! Since this is from the master branch, and uses an official version of Go, bugs for it are still valid so long as you post the output of |
@LetItGlow For context, it appears like the build system is broken in a strange way. |
And my intuition was right. Should have noticed, when it said "71d7cf7XX" |
@djdv I broke |
71d7cf7 is better, e375224 has this bug in a different way.
edit: I am trying to get a cleaner version by making a standalone test scenario. Ok, now I get it.
But while the daemon is active:
wat? as soon the daemon is running, using pipes results in a error, where the non-pipe works. |
Sorry for the run around, we switched our dependency model recently. The problem with the last build was that it was not including the fixed version of the cmds lib and I must have tested it when the daemon was offline. This is 3702368 except that it uses the latest cmds lib (now through https://ipfs.io/ipfs/QmaD7s7mwwZkDRBQj5xSKFCVHWdDFuX5F5m6gjiUDLK7X2 This is a dirty build, but if you encounter issues with it that aren't already reported just link back to here in the issue. You can put the blame on me ;^) Thanks for testing! I appreciate the patience with it. |
I need to check ALL three versions again, because I stumbled on a funny problem, where deleting the "api" file while the daemon is running is a bad idea. |
Case 1 is a test using pipes 4.18 (official): 4.19 (official): 0.4.20-dev-71d7cf7b0 0.4.20-dev-e375224c3 0.4.20-dev-3702368fe-dirty While doing this, I stumbled on a problem. This also goes the other way, when a daemon is running, but the "api" file is deleted. TL;DR: |
Thanks @LetItGlow! Glad to hear it's working. If you would, please create a separate issue for that one. |
Unfortunately, we can't get operating systems like linux/macos to do the same thing. Take a look at #5784. I'd like to modify go-ipfs to try the API and then automatically fall back on the local repo. |
I have a hunch why this "api" file exists. With manipulation, I can use an IPFS instance from Node A+it's own repo to redirect to the API and repo of a Node B daemon.. Both nodes are locally though. Probably it could use the config file to read the API setting directly and try to connect to that, if there is no "hello", default to standalone mode. With my bad skills, i'd probably check for a repo.lock, if there is none, there is no daemon. quick, simple but dirty. and prone to throw an error, when there is a lingering repo.lock However, when I was experimenting with GETH, the CLI could autodetermine the (running) server using RPC or Mutex or Pipe whatever, it checked for that existing and connected to that automatically. GETH is written in go, too as I just noticed. |
It's not actually that rare. I use this feature and I know several other devs use it.
Unfortunately, reading the config isn't sufficient. The config may list the unspecified/all address (
We'd eventually like to support connecting to a daemon via a unix socket as well. However, we'd still likely ahve to support both. |
In the last few days, I have written a batch, which encapsulates and "extends" some IPFS-commands.
As soon, I updated my binaries to 0.4.19, some parts of the batch broke.
For now what I have found, when I unpin a hash.
with 0.4.18, I could do this:
with 0.4.19, as soon there is a
>NUL
behind the command, it completely freaks out.
This:
Returns this:
It returns:
Error: sync /dev/stdout: Unzulässige Funktion.
and sets the Errorlevel to 1, although it successfully unpinned the given hash - verified withipfs pin ls <hash>
afterwards, so it's even more misleading.When I change my code to this:
It returns:
Which is the expected output. I need the pape to >NUL though, as I don't need the output sometimes.
For now, I'll revert to 0.4.18
I am using Windows 10 x64, with the x64 binaries. Language: DE, if it matters.
The text was updated successfully, but these errors were encountered: