Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

(Phase 1) Project wide refactor and generalization #2

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

ksdme
Copy link
Member

@ksdme ksdme commented May 30, 2018

This rebases and updates the project with some fixes, improves the code style and adds generalization (Concurrent coala analysis cycles, result processing, logging, file proxies).

@ksdme ksdme changed the title Phase 1; Project wide refactor and generalization (Phase 1) Project wide refactor and generalization May 30, 2018
@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

.coafile Outdated
bears = LineLengthBear
ignore_length_regex = ^.*https?://

[commit]
[all.commit]
enabled = False
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this.

@ksdme
Copy link
Member Author

ksdme commented May 30, 2018

@gaocegege

@@ -6,4 +6,4 @@ coverage:
project:
default:
enabled: true
target: 95%
target: 100%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayvdb Do we enable the repository in codecov?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this be 100% when the tests are not being run?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is added in another PR

.travis.yml Outdated
# - npm test
# - cd - > /dev/null
# - coverage run $(which behave) ./tests/server.features
# - coverage run -a -m unittest discover -s tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you implement the test in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I plan to add tests in the next PR.

README.md Outdated

[![Build Status](https://travis-ci.org/coala/coala-vs-code.svg?branch=master)](https://travis-ci.org/coala/coala-vs-code)
[![codecov](https://codecov.io/gh/coala/coala-vs-code/branch/master/graph/badge.svg)](https://codecov.io/gh/coala/coala-vs-code)
A coala language server [Language Server Protocol (LSP)](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md). Python versions 3.x is supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think A coala language server based on is better.

README.md Outdated
## Known bugs

* [Language server restarts when `didSave` requests come](https://github.com/coala/coala-vs-code/issues/7)

## Reference

* [python-langserver](https://github.com/sourcegraph/python-langserver)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add pyls

requirements.txt Outdated
typing>=3.5.3.0
coala-bears>=0.10.0.dev20170215041744
coala>=0.11.0
coala-bears>=0.11.1
python-language-server~=0.18.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some comments about why we use ~= for python-language-server

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not. I will replace this dependency with the jsonrpc module that @gatesn forked.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, SGTM

path = UriUtils.path_from_uri(uri)

diagnostics = self.local_analyse_file(path)
logging.basicConfig(level=logging.INFO)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we configure the logging here?

self.root_path = UriUtils.path_from_uri(params['rootPath'])

return {
'capabilities': {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid hard code here? Maybe we could use a const variable.

logger = logging.getLogger(__name__)


class coala_wrapper:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About the class name, I think we have two patterns: coala_wrapper and LangServer. Could we unify the way?

if workspace is None:
workspace = '.'

# change workspace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not have additional information, maybe we could remove it or rewrite it.


@staticmethod
def _run_coala():
stream, retval = StringIO(), -1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is retval used here?

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

@ksdme
Copy link
Member Author

ksdme commented Jun 1, 2018

@gaocegege @jayvdb @gatesn Please take a look.

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM

@@ -0,0 +1,8 @@
class LSP_Entity:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/LSP_Entity/LSPEntity

cycles.
"""
result = self._tracked_pool.exec_func(
coalaWrapper.analyse_file, (file_proxy,), kargs, force=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be force=force?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be.

"""
JobTracker helps to keep track of running jobs and
function as an advanced counter. It is lazy and will
only updated its internal state when requested for
Copy link
Member

@nalinbhardwaj nalinbhardwaj Jun 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/updated/update

JobTracker and func_wrapper.
"""

def __init__(self, max_jobs=1, max_workers=1):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to default max_workers=1 across the files? Why not just use the user's multiprocessing.cpu_count()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should generally suffice having max_jobs == max_workers with a soft upper cap of cpu_count() on max_workers. Since the default for max_jobs is 1, max_workers can safely be 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe I misunderstand something, but isn't max_jobs eventually going to be a user preference? In which case, having max_workers=multiprocessing.cpu_count() makes sense(since that should probably never be exposed to user preferences)?

It's fine if you want to make those changes later(when it does indeed become a preference), I just thought it's a more sensible default.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you suggestion. I think max_jobs will be a user preference sometime later. I'll defer this change until the time it is actually exposed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please review the parts of code I just added.

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

return self._contents

def close(self):
del self._contents
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self._contents is a string. This yields a AttributeError.


@classmethod
def entity_name(cls):
return cls.__class__.__name__
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cls.__class__ is type. This should rather be cls.__name__.


def force_free_slots(self):
if self.has_slots():
return
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should return True.

self._job_tracker = JobTracker(max_jobs)
self._process_pool = ProcessPoolExecutor(max_workers=max_workers)

def exec_func(self, func, params=[], kargs={}, force=False):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for types of params and kargs.

return a Future or a boolean depending on the
allocation.
"""
proxy = self._proxy_map.resolve(filename, self.root_path)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coalaWrapper has access to _proxy_map. It should be responsible to resolve the proxy itself.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should handle a proxy resolution failing because of failed attempt to open file.

return not job.done()

def __init__(self, max_jobs=1):
self._max_jobs = max_jobs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure max_jobs > 0.

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

@gaocegege
Copy link
Member

@jayvdb PTAL

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

@ksdme
Copy link
Member Author

ksdme commented Jun 4, 2018

https://github.com/ksdme/coala-ls/tree/gsoc-phase-1-tests contains the tests for this module. The coverage is at 100% currently.

@ksdme
Copy link
Member Author

ksdme commented Jun 4, 2018

@sadovnychyi PTAL


try:
server = TCPServer((bind_addr, port), wrapper_class)
except Exception as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are going to run this from CLI I think you should catch a KeyboardInterrupt separately and just exit('Command killed by keyboard interrupt') or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the TCP mode will mostly be used from CLI during debugging.

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

3rd Build

sed -i.bak '/bears = GitCommitBear/d' .coafile
sed: can't read .coafile: No such file or directory

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM

@@ -26,12 +26,6 @@ before_install:
sleep 3;
fi

- cd ./vscode-client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not import the changes about vscode in this PR since we have a separate PR to do it 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR builds on top of #7 with cbbaaf8. These changes are a part of that commit. CI will fail if not for this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then we could remove it after #7 merged.

@TravisBuddy
Copy link

Travis tests have failed

Hey @ksdme,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

</strong>
hostname: e20b4e2f-9c3d-4767-901a-13a25ab44c17@1.i-0fe0fbf-production-2-worker-org-ec2.travisci.net
version: v3.8.2 https://github.com/travis-ci/worker/tree/c370f713bb4195cce20cdc6ce3e62f26b8cf3961
instance: f9b381f travisci/ci-garnet:packer-1512502276-986baf0 (via amqp)
startup: 1.414736492s
Build system information
Build language: python
Build group: stable
Build dist: trusty
Build id: 400328644
Job id: 400328648
Runtime kernel version: 4.14.12-041412-generic
travis-build version: f1025b0c8
Build image provisioning date and time
Tue Dec  5 20:11:19 UTC 2017
Operating System Details
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.5 LTS
Release:	14.04
Codename:	trusty
Cookbooks Version
7c2c6a6 https://github.com/travis-ci/travis-cookbooks/tree/7c2c6a6
git version
git version 2.15.1
bash version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
gcc version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:39:28 2017
 OS/Arch:      linux/amd64
clang version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-5.0.0/bin
jq version
jq-1.5
bats version
Bats 0.4.0
shellcheck version
0.4.6
shfmt version
v2.0.0
ccache version
ccache version 3.1.9

Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2011 Joel Rosdahl

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
cmake version
cmake version 3.9.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
heroku version
heroku-cli/6.14.39-addc925 (linux-x64) node-v9.2.0
imagemagick version
Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
md5deep version
4.2
mercurial version
Mercurial Distributed SCM (version 4.2.2)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2017 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mysql version
mysql  Ver 14.14 Distrib 5.6.33, for debian-linux-gnu (x86_64) using  EditLine wrapper
openssl version
OpenSSL 1.0.1f 6 Jan 2014
packer version
Packer v1.0.2

Your version of Packer is out of date! The latest version
is 1.1.2. You can update by downloading from www.packer.io
postgresql client version
psql (PostgreSQL) 9.6.6
ragel version
Ragel State Machine Compiler version 6.8 Feb 2013
Copyright (c) 2001-2009 by Adrian Thurston
subversion version
svn, version 1.8.8 (r1568071)
   compiled Aug 10 2017, 17:20:39 on x86_64-pc-linux-gnu

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.3
  - handles 'http' scheme
  - handles 'https' scheme

sudo version
Sudo version 1.8.9p5
Configure options: --prefix=/usr -v --with-all-insults --with-pam --with-fqdn --with-logging=syslog --with-logfac=authpriv --with-env-editor --with-editor=/usr/bin/editor --with-timeout=15 --with-password-timeout=0 --with-passprompt=[sudo] password for %p:  --without-lecture --with-tty-tickets --disable-root-mailer --enable-admin-flag --with-sendmail=/usr/sbin/sendmail --with-timedir=/var/lib/sudo --mandir=/usr/share/man --libexecdir=/usr/lib/sudo --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu --with-selinux
Sudoers policy plugin version 1.8.9p5
Sudoers file grammar version 43

Sudoers path: /etc/sudoers
Authentication methods: 'pam'
Syslog facility if syslog is being used for logging: authpriv
Syslog priority to use when user authenticates successfully: notice
Syslog priority to use when user authenticates unsuccessfully: alert
Send mail if the user is not in sudoers
Use a separate timestamp for each user/tty combo
Lecture user the first time they run sudo
Root may run sudo
Allow some information gathering to give useful error messages
Require fully-qualified hostnames in the sudoers file
Visudo will honor the EDITOR environment variable
Set the LOGNAME and USER environment variables
Length at which to wrap log file lines (0 for no wrap): 80
Authentication timestamp timeout: 15.0 minutes
Password prompt timeout: 0.0 minutes
Number of tries to enter a password: 3
Umask to use or 0777 to use user's: 022
Path to mail program: /usr/sbin/sendmail
Flags for mail program: -t
Address to send mail to: root
Subject line for mail messages: *** SECURITY information for %h ***
Incorrect password message: Sorry, try again.
Path to authentication timestamp dir: /var/lib/sudo
Default password prompt: [sudo] password for %p: 
Default user to run commands as: root
Value to override user's $PATH with: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Path to the editor for use by visudo: /usr/bin/editor
When to require a password for 'list' pseudocommand: any
When to require a password for 'verify' pseudocommand: all
File descriptors >= 3 will be closed before executing a command
Environment variables to check for sanity:
	TZ
	TERM
	LINGUAS
	LC_*
	LANGUAGE
	LANG
	COLORTERM
Environment variables to remove:
	RUBYOPT
	RUBYLIB
	PYTHONUSERBASE
	PYTHONINSPECT
	PYTHONPATH
	PYTHONHOME
	TMPPREFIX
	ZDOTDIR
	READNULLCMD
	NULLCMD
	FPATH
	PERL5DB
	PERL5OPT
	PERL5LIB
	PERLLIB
	PERLIO_DEBUG 
	JAVA_TOOL_OPTIONS
	SHELLOPTS
	GLOBIGNORE
	PS4
	BASH_ENV
	ENV
	TERMCAP
	TERMPATH
	TERMINFO_DIRS
	TERMINFO
	_RLD*
	LD_*
	PATH_LOCALE
	NLSPATH
	HOSTALIASES
	RES_OPTIONS
	LOCALDOMAIN
	CDPATH
	IFS
Environment variables to preserve:
	JAVA_HOME
	TRAVIS
	CI
	DEBIAN_FRONTEND
	XAUTHORIZATION
	XAUTHORITY
	PS2
	PS1
	PATH
	LS_COLORS
	KRB5CCNAME
	HOSTNAME
	HOME
	DISPLAY
	COLORS
Locale to use while parsing sudoers: C
Directory in which to store input/output logs: /var/log/sudo-io
File in which to store the input/output log: %{seq}
Add an entry to the utmp/utmpx file when allocating a pty
PAM service name to use
PAM service name to use for login shells
Create a new PAM session for the command to run in
Maximum I/O log sequence number: 0

Local IP address and netmask pairs:
	172.17.0.2/255.255.0.0

Sudoers I/O plugin version 1.8.9p5
gzip version
gzip 1.6
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
zip version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon.  Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.

Compiled with gcc 4.8.2 for Unix (Linux ELF) on Oct 21 2013.

Zip special compilation options:
	USE_EF_UT_TIME       (store Universal Time)
	BZIP2_SUPPORT        (bzip2 library version 1.0.6, 6-Sept-2010)
	    bzip2 code and library copyright (c) Julian R Seward
	    (See the bzip2 license for terms of use)
	SYMLINK_SUPPORT      (symbolic links supported)
	LARGE_FILE_SUPPORT   (can read and write large files on file system)
	ZIP64_SUPPORT        (use Zip64 to store large files in archives)
	UNICODE_SUPPORT      (store and read UTF-8 Unicode paths)
	STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
	UIDGID_NOT_16BIT     (old Unix 16-bit UID/GID extra field not used)
	[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)

Encryption notice:
	The encryption code of this program is not copyrighted and is
	put in the public domain.  It was originally written in Europe
	and, to the best of our knowledge, can be freely distributed
	in both source and object forms from any country, including
	the USA under License Exception TSU of the U.S. Export
	Administration Regulations (section 740.13(e)) of 6 June 2002.

Zip environment options:
             ZIP:  [none]
          ZIPOPT:  [none]
vim version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:43:18)
Included patches: 1-52
Extra patches: 8.0.0056
Modified by [email protected]
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions      
iptables version
iptables v1.4.21
curl version
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
wget version
GNU Wget 1.15 built on linux-gnu.
rsync version
rsync  version 3.1.0  protocol version 31
gimme version
v1.2.0
nvm version
0.33.6
perlbrew version
/home/travis/perl5/perlbrew/bin/perlbrew  - App::perlbrew/0.80
phpenv version
rbenv 1.1.1-25-g6aa70b6
rvm version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
default ruby version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
CouchDB version
couchdb 1.6.1
ElasticSearch version
5.5.0
Installed Firefox version
firefox 56.0.2
MongoDB version
MongoDB 3.4.10
PhantomJS version
2.1.1
Pre-installed PostgreSQL versions
9.2.24
9.3.20
9.4.15
9.5.10
9.6.6
RabbitMQ Version
3.6.14
Redis version
redis-server 4.0.6
riak version
2.2.3
Pre-installed Go versions
1.7.4
ant version
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
mvn version
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z)
Maven home: /usr/local/maven-3.5.2
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-101-generic", arch: "amd64", family: "unix"
gradle version

------------------------------------------------------------
Gradle 4.0.1
------------------------------------------------------------

Build time:   2017-07-07 14:02:41 UTC
Revision:     38e5dc0f772daecca1d2681885d3d85414eb6826

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_151 (Oracle Corporation 25.151-b12)
OS:           Linux 4.4.0-101-generic amd64

lein version
Leiningen 2.8.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM
Pre-installed Node.js versions
v4.8.6
v6.12.0
v6.12.1
v8.9
v8.9.1
phpenv versions
  system
  5.6
* 5.6.32 (set by /home/travis/.phpenv/version)
  7.0
  7.0.25
  7.1
  7.1.11
  hhvm
  hhvm-stable
composer --version
Composer version 1.5.2 2017-09-11 16:59:25
Pre-installed Ruby versions
ruby-2.2.7
ruby-2.3.4
ruby-2.4.1

Network availability confirmed.


$ git clone --depth=50 https://github.com/coala/coala-ls.git coala/coala-ls
Cloning into 'coala/coala-ls'...
remote: Counting objects: 271, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 271 (delta 2), reused 4 (delta 1), pack-reused 259
Receiving objects: 100% (271/271), 524.54 KiB | 17.48 MiB/s, done.
Resolving deltas: 100% (114/114), done.

$ cd coala/coala-ls
$ git fetch origin +refs/pull/2/merge:
remote: Counting objects: 110, done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 110 (delta 39), reused 105 (delta 36), pack-reused 0
Receiving objects: 100% (110/110), 1.69 MiB | 19.22 MiB/s, done.
Resolving deltas: 100% (39/39), completed with 5 local objects.
From https://github.com/coala/coala-ls
 * branch            refs/pull/2/merge -> FETCH_HEAD

$ git checkout -qf FETCH_HEAD
$ source ~/virtualenv/python3.6/bin/activate

Setting up build cache
$ export CASHER_DIR=$HOME/.casher
$ Installing caching utilities


attempting to download cache archive
fetching PR.2/cache-linux-trusty-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--python-3.6.tgz
found cache


adding /home/travis/build/coala/coala-ls/node_modules to cache
creating directory /home/travis/build/coala/coala-ls/node_modules



adding /home/travis/.cache/pip to cache

$ python --version
Python 3.6.3
$ pip --version
pip 9.0.1 from /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages (python 3.6)
$ pip install moban
Collecting moban
  Downloading https://files.pythonhosted.org/packages/77/12/649792c31683bb9a7f6d1a830a4e93cd939bbf47f33b4fc6c52f63f29c3c/moban-0.2.2-py2.py3-none-any.whl
Collecting pyyaml>=3.11 (from moban)
Collecting lml==0.0.3 (from moban)
  Downloading https://files.pythonhosted.org/packages/35/29/a0a2bc0b70a2eb21d2315d45590e9bcee640cb04d48090a19c36a07edf2d/lml-0.0.3-py2.py3-none-any.whl
Collecting jinja2>=2.7.1 (from moban)
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting crayons (from moban)
Collecting MarkupSafe>=0.23 (from jinja2>=2.7.1->moban)
Collecting colorama (from crayons->moban)
  Using cached https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl
Installing collected packages: pyyaml, lml, MarkupSafe, jinja2, colorama, crayons, moban
Successfully installed MarkupSafe-1.0 colorama-0.3.9 crayons-0.1.2 jinja2-2.10 lml-0.0.3 moban-0.2.2 pyyaml-3.12

$ .ci/check_moban.sh
+: master
+git clone https://gitlab.com/coala/mobans --branch=master ../coala-mobans
Cloning into '../coala-mobans'...
warning: redirecting to https://gitlab.com/coala/mobans.git/
remote: Counting objects: 305, done.
remote: Compressing objects: 100% (222/222), done.
remote: Total 305 (delta 136), reused 198 (delta 61)
Receiving objects: 100% (305/305), 418.09 KiB | 14.42 MiB/s, done.
Resolving deltas: 100% (136/136), done.
+moban
Templating coala-gitignore.jj2 to .gitignore
Templated 1 file.
Everything is up to date!
+git diff --exit-code
diff --git a/.gitignore b/.gitignore
index f098d4d..7927b7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -281,6 +281,14 @@ tags
 .idea/**/gradle.xml
 .idea/**/libraries
 
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn.  Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+
 # CMake
 cmake-build-*/

ksdme added 19 commits July 5, 2018 15:13
Update .gitignore with .idea/ as per Gradle
and Maven auto import.
Drop vscode client since no component of
coala-ls now is specific to or depends
on VSCode.
This updates the README text and updates the
demo assets.
Due to the heavy restructuring required to adapt
this module into architecture for coala-ls the
old codebase is dropped.
Add test resource file with intentional syntax
breaks or containing expected diagnostics.

Add test helpers.
Configures test env to add coalals to sys.path.
Adds files modules and corrosponding tests.
Add log.py that can handle configuring logging.
Add wrappers for methods and streams.
Add support for job tracking, concurrent execution
via abstract process pools.
Add initial mechanism to run coala analyser and
gather the results.
Add module to process the results and convert coala
diagnostic messages to language server supported
messages. Supports code fixing messages also.
Add language server class capable of handling event
notifications and respond accordingly.
Add functions to invoke language server instance
with respective streams as per the invocation mode.
Add __main__ to make coalals an executable module.
Update the requirement to latest versions.
Update the test requirements to use pytest.
- Increase coverage requirement to 100%.
- Update omissions in coverage.
- Updates travis to use py.test.
Add script to start coala-ls.
@ksdme
Copy link
Member Author

ksdme commented Jul 5, 2018

This PR is now built on top of #12, #7, #8.

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

Successfully merging this pull request may close these issues.

6 participants