Giter Site home page Giter Site logo

Comments (10)

kenshaw avatar kenshaw commented on September 18, 2024

I cannot reproduce this. I would need more information. Did you modify/change your local copy of the repository?

from dburl.

dolmen avatar dolmen commented on September 18, 2024

No, I have not changed my local copy. go describe --always --dirty would have reported this (--dirty flag).

from dburl.

kenshaw avatar kenshaw commented on September 18, 2024

@dolmen I would need more information then. Are you running an old version of Go or some such? Please provide information on the platform / go version / etc. you're using. Otherwise, I have nothing available to me to reproduce this behavior.

from dburl.

dolmen avatar dolmen commented on September 18, 2024
go version go1.10.3 darwin/amd64

from dburl.

dolmen avatar dolmen commented on September 18, 2024

I've gone back in history to find where the breakage is starting (git checkout HEAD~1 && go test -run TestParse).

First commit where go test -run TestParse fails is c1aceeb.

from dburl.

dolmen avatar dolmen commented on September 18, 2024

I notice that resolving Postgres URL calls os.Stat (in func mode in util.go).

I don't have Postgres installed on my machine, so /var/run/postgresql doesn't exist. This is the difference.

I'm updating the title. Please reopen.

from dburl.

dolmen avatar dolmen commented on September 18, 2024

It is very bad that a function called Parse has different results depending on the filesystem state.

Worse: this behaviour is not documented.

from dburl.

kenshaw avatar kenshaw commented on September 18, 2024

@dolmen I appreciate your interest in this project, but this is not an actual issue. The unit tests work properly to test what they were designed to test. If you'd like to submit a PR selectively disabling these unit tests for use on environments where PostgreSQL is not installed, I'd consider merging that.

from dburl.

dolmen avatar dolmen commented on September 18, 2024

Because of this issue, the testsuite doesn't work also on non-Unix environments (e.g. Windows).

from dburl.

kenshaw avatar kenshaw commented on September 18, 2024

@dolmen I've already stated that if you'd like to submit a PR selectively disabling this functionality (ie, for certain environments such as Windows), I'd be open to it. As it is, the reason this won't work on Windows, is because Windows (until very recently) has not supported Unix Domain Sockets. That said, the latest version of Windows 10 1603 does indeed support Unix Domain Sockets. As such, the correct thing to do here would be to:

  1. First fix Go to work with AF_UNIX on Windows
  2. Submit a PR changing the path this is used against, selectively based on OS using Go's build tags

Also, it's worth noting that unit tests do not need to work on every platform. These unit tests work for all the testing environments they were designed for. If they are not working on your platform, that's because you're using a non-standard platform (Windows) for development.

I have no intention of rewriting unit tests to work on broken Windows environments. By and large the users / developers of Go, usql, and dburl are not using Windows systems. If you would like the unit tests to work on (in my opinion) the broken Windows platform, feel free to submit a PR. I'll gladly accept it assuming it is well written.

from dburl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.