purcell / sqlint

Simple SQL linter supporting ANSI and PostgreSQL syntaxes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot get working in travis build

grking8 opened this issue · comments

not sure if this is an issue with sqlint or pq_query

/home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': incompatible library version - /home/travis/.rvm/gems/ruby-2.4.1/gems/pg_query-1.0.2/lib/pg_query/pg_query.so (LoadError)
	from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/pg_query-1.0.2/lib/pg_query.rb:4:in `<top (required)>'
	from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /home/travis/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/sqlint-0.1.8/bin/sqlint:4:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/sqlint:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/sqlint:23:in `<main>'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks2.4:15:in `eval'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks2.4:15:in `<main>'

which is the output from travis (trusty linux) with the below .travis.yml

language: python
python:
  - "3.6"
install:
  - yes "" | sudo apt-add-repository ppa:brightbox/ruby-ng
  - sudo apt-get update
  - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda
  # Useful for debugging any issues with conda
  - conda info -a
  - conda env create --name event-completeness --file environment.yml
  - source activate event-completeness
  - sudo apt-get install ruby2.4 ruby2.4-dev
  - sudo gem install pg
  - sudo gem pristine --all
  - sudo gem install pg_query
  - sudo gem install sqlint
  - sqlint *.sql
script:
  - flake8 .

works fine locally on ubuntu 16.04

sudo apt install ruby-full
sudo gem install sqlint
sqlint <sqlfile>

Any pointers appreciated!

Not sure, sorry, but it looks like it's pg_query that's failing. sqlint depended on a slightly older version of pg_query, so I've pushed a new version of sqlint (0.1.9) which should work with the latest pg_query`. You might consider trying again with that version. Beyond that, I don't have any suggestions, sorry.

Ok cool thanks for pushing up a new version!