From 40cc5822b1dbd06615bcbe966fffb3a64d255462 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 11 Jan 2020 13:04:35 -0500 Subject: [PATCH 01/11] ci: install perl provider --- .travis.yml | 3 +++ appveyor.yml | 3 --- ci/before_install.sh | 1 - ci/build.ps1 | 22 ++++++++++++++++++++-- ci/install.sh | 3 +++ 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bb5c00251..53faf29cc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,6 +71,7 @@ addons: - build-essential - clang - cmake + - cpanminus - cscope - gcc-multilib - gdb @@ -90,7 +91,9 @@ addons: - powershell packages: - ccache + - cpanminus - ninja + - perl jobs: include: diff --git a/appveyor.yml b/appveyor.yml index 7e2aef345b..01ca16f930 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,9 +22,6 @@ init: #- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) matrix: fast_finish: true -install: [] -before_build: -- ps: Install-Product node 10 build_script: - powershell ci\build.ps1 after_build: diff --git a/ci/before_install.sh b/ci/before_install.sh index 5810bec71a..0303936bdd 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -44,7 +44,6 @@ fi source ~/.nvm/nvm.sh nvm install 10 -nvm use 10 if [[ -n "$CMAKE_URL" ]]; then echo "Installing custom CMake: $CMAKE_URL" diff --git a/ci/build.ps1 b/ci/build.ps1 index 524dabdf3e..b2a4c1ec2a 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -29,6 +29,25 @@ function exitIfFailed() { } } +# https://github.com/lukesampson/scoop#installation +$scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') +& { + Set-StrictMode -Off + Invoke-Expression $scoop +} + +scoop install nodejs-lts perl +node --version +npm.cmd --version +perl --version +cpanm.bat --version + +cpanm.bat -n Neovim::Ext +if ($LastExitCode -ne 0) { + Get-Content -Path "$env:USERPROFILE\.cpanm\build.log" +} +perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'; exitIfFailed + if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) { write-host "cache dir not found: $($env:DEPS_BUILD_DIR)" mkdir $env:DEPS_BUILD_DIR @@ -57,7 +76,7 @@ if ($compiler -eq 'MINGW') { # in MSYS2, but we cannot build inside the MSYS2 shell. $cmakeGenerator = 'Ninja' $cmakeGeneratorArgs = '-v' - $mingwPackages = @('ninja', 'cmake', 'perl', 'diffutils').ForEach({ + $mingwPackages = @('ninja', 'cmake', 'diffutils').ForEach({ "mingw-w64-$arch-$_" }) @@ -115,7 +134,6 @@ if (-not $NoTests) { if (-Not (Test-Path -PathType Leaf "$env:TREE_SITTER_DIR\bin\c.dll")) { exit 1 } - } if ($compiler -eq 'MSVC') { diff --git a/ci/install.sh b/ci/install.sh index 3364edfe70..b3ec9e7f65 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -50,3 +50,6 @@ else gcc -m32 -o "$TREE_SITTER_DIR/bin/c.so" -shared parser.c -I. fi test -f "$TREE_SITTER_DIR/bin/c.so" + +sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log" +perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION' From 4faf30de3ea72bd188c8894eb10f0c971ff28e90 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 12 Jan 2020 01:14:43 -0500 Subject: [PATCH 02/11] ci/Appveyor: install diffutils via scoop scoop is a Windows package manager, similar to homebrew on OSX. It is written on powershell, works in unelevated accounts, is regularly maintained, and does not need mingw/msys2/cygwin or WSL environments. Sample use case is running (busybox) bash, which can be installed via scoop via "scoop install busybox", to use CI bash scripts in Appveyor. Parts of scoop's directory can be cached to avoid downloads. scoop modifies the registry for persistence environment variables so scoop itself cannot be cached. --- ci/build.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index b2a4c1ec2a..afef9df6bf 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -36,7 +36,8 @@ $scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh' Invoke-Expression $scoop } -scoop install nodejs-lts perl +scoop install diffutils nodejs-lts perl +diff3 --version node --version npm.cmd --version perl --version @@ -76,7 +77,7 @@ if ($compiler -eq 'MINGW') { # in MSYS2, but we cannot build inside the MSYS2 shell. $cmakeGenerator = 'Ninja' $cmakeGeneratorArgs = '-v' - $mingwPackages = @('ninja', 'cmake', 'diffutils').ForEach({ + $mingwPackages = @('ninja', 'cmake').ForEach({ "mingw-w64-$arch-$_" }) From c25b5a1576eca912671d5f2fe47043055fbca2b0 Mon Sep 17 00:00:00 2001 From: Jacques Germishuys Date: Mon, 4 Nov 2019 17:33:07 +0000 Subject: [PATCH 03/11] remote plugins: add support for perl hosts --- runtime/autoload/provider/perl.vim | 73 ++++++++++++++++++++++++++++++ runtime/autoload/remote/host.vim | 4 ++ 2 files changed, 77 insertions(+) create mode 100644 runtime/autoload/provider/perl.vim diff --git a/runtime/autoload/provider/perl.vim b/runtime/autoload/provider/perl.vim new file mode 100644 index 0000000000..4546a85100 --- /dev/null +++ b/runtime/autoload/provider/perl.vim @@ -0,0 +1,73 @@ +if exists('s:loaded_perl_provider') + finish +endif + +let s:loaded_perl_provider = 1 + +function! provider#perl#Detect() abort + " use g:perl_host_prof if set or check if perl is on the path + let prog = get(g:, 'perl_host_prog', executable('perl') ? 'perl' : '') + + " if perl is available, make sure the required module is available + if prog != '' + let job_id = jobstart(prog.' -MNeovim::Ext -e "exit 0"', {'stdout_buffered': v:true}) + let result = jobwait([job_id]) + if result[0] != 0 + let prog = '' + endif + endif + + return prog +endfunction + +function! provider#perl#Prog() abort + return s:prog +endfunction + +function! provider#perl#Require(host) abort + if s:err != '' + echoerr s:err + return + endif + + let prog = provider#perl#Prog() + let args = [s:prog, '-e', 'use Neovim::Ext; start_host();'] + + " Collect registered perl plugins into args + let perl_plugins = remote#host#PluginsForHost(a:host.name) + for plugin in perl_plugins + call add(args, plugin.path) + endfor + + return provider#Poll(args, a:host.orig_name, '$NVIM_PERL_LOG_FILE') +endfunction + +function! provider#perl#Call(method, args) abort + if s:err != '' + echoerr s:err + return + endif + + if !exists('s:host') + try + let s:host = remote#host#Require('perl') + catch + let s:err = v:exception + echohl WarningMsg + echomsg v:exception + echohl None + return + endtry + endif + return call('rpcrequest', insert(insert(a:args, 'perl_'.a:method), s:host)) +endfunction + +let s:err = '' +let s:prog = provider#perl#Detect() +let g:loaded_perl_provider = empty(s:prog) ? 1 : 2 + +if g:loaded_perl_provider != 2 + let s:err = 'Cannot find perl or the required perl module' +endif + +call remote#host#RegisterPlugin('perl-provider', 'perl', []) diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index 1cf328e08d..c34ff4bee7 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -203,3 +203,7 @@ call remote#host#Register('ruby', '*.rb', " nodejs call remote#host#Register('node', '*', \ function('provider#node#Require')) + +" perl +call remote#host#Register('perl', '*', + \ function('provider#perl#Require')) From 3420bd21e19cf5feaeca1524e0dfcbabaac5d7c5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 13 Jan 2020 19:48:59 -0500 Subject: [PATCH 04/11] provider/perl: add basic tests --- test/functional/helpers.lua | 2 +- test/functional/provider/perl_spec.lua | 75 ++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 test/functional/provider/perl_spec.lua diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index de61ff9cc8..3ffc6137d6 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -768,7 +768,7 @@ function module.new_pipename() end function module.missing_provider(provider) - if provider == 'ruby' or provider == 'node' then + if provider == 'ruby' or provider == 'node' or provider == 'perl' then local prog = module.funcs['provider#' .. provider .. '#Detect']() return prog == '' and (provider .. ' not detected') or false elseif provider == 'python' or provider == 'python3' then diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua new file mode 100644 index 0000000000..640fe0f622 --- /dev/null +++ b/test/functional/provider/perl_spec.lua @@ -0,0 +1,75 @@ +local helpers = require('test.functional.helpers')(after_each) +local eq, clear = helpers.eq, helpers.clear +local missing_provider = helpers.missing_provider +local command = helpers.command +local write_file = helpers.write_file +local eval = helpers.eval +local retry = helpers.retry + +do + clear() + local reason = missing_provider('perl') + if reason then + pending(string.format("Missing perl host, or perl version is too old (%s)", reason), function() end) + return + end +end + +before_each(function() + clear() +end) + +describe('perl host', function() + teardown(function () + os.remove('Xtest-perl-hello.pl') + os.remove('Xtest-perl-hello-plugin.pl') + end) + + it('works', function() + local fname = 'Xtest-perl-hello.pl' + write_file(fname, [[ + package main; + use v5.22.1; + use Neovim::Ext; + use Neovim::Ext::MsgPack::RPC; + + my $session = Neovim::Ext::MsgPack::RPC::socket_session($ENV{NVIM_LISTEN_ADDRESS}); + my $nvim = Neovim::Ext::from_session($session); + $nvim->command('let g:job_out = "hello"'); + 1; + ]]) + command('let g:job_id = jobstart(["perl", "'..fname..'"])') + retry(nil, 3000, function() eq('hello', eval('g:job_out')) end) + end) + + it('plugin works', function() + local fname = 'Xtest-perl-hello-plugin.pl' + write_file(fname, [[ + package TestPlugin; + use parent qw(Neovim::Ext::Plugin); + + __PACKAGE__->register; + + @{TestPlugin::commands} = (); + @{TestPlugin::specs} = (); + sub test_command :nvim_command('TestCommand') + { + my ($this) = @_; + $this->nvim->command('let g:job_out = "hello-plugin"'); + } + + package main; + use v5.22.1; + use Neovim::Ext; + use Neovim::Ext::MsgPack::RPC; + + my $session = Neovim::Ext::MsgPack::RPC::socket_session($ENV{NVIM_LISTEN_ADDRESS}); + my $nvim = Neovim::Ext::from_session($session); + my $plugin = TestPlugin->new($nvim); + $plugin->test_command(); + 1; + ]]) + command('let g:job_id = jobstart(["perl", "'..fname..'"])') + retry(nil, 3000, function() eq('hello-plugin', eval('g:job_out')) end) + end) +end) From ef3e61013882ed92e0208b9d1ac3488494c7ac53 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 15 Jan 2020 21:12:36 -0500 Subject: [PATCH 05/11] provider/perl: simplify detection --- runtime/autoload/provider/perl.vim | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/runtime/autoload/provider/perl.vim b/runtime/autoload/provider/perl.vim index 4546a85100..36ca2bbf14 100644 --- a/runtime/autoload/provider/perl.vim +++ b/runtime/autoload/provider/perl.vim @@ -6,18 +6,14 @@ let s:loaded_perl_provider = 1 function! provider#perl#Detect() abort " use g:perl_host_prof if set or check if perl is on the path - let prog = get(g:, 'perl_host_prog', executable('perl') ? 'perl' : '') - - " if perl is available, make sure the required module is available - if prog != '' - let job_id = jobstart(prog.' -MNeovim::Ext -e "exit 0"', {'stdout_buffered': v:true}) - let result = jobwait([job_id]) - if result[0] != 0 - let prog = '' - endif + let prog = exepath(get(g:, 'perl_host_prog', 'perl')) + if empty(prog) + return '' endif - return prog + " if perl is available, make sure the required module is available + call system([prog, '-W', '-MNeovim::Ext', '-e', '']) + return v:shell_error ? '' : prog endfunction function! provider#perl#Prog() abort From 2063af3c94834ed35155ae9cb3d7daa1564bb1a9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 15 Jan 2020 21:56:46 -0500 Subject: [PATCH 06/11] provider/perl: add health check --- runtime/autoload/health/provider.vim | 43 +++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index ad7a614ff5..29abf02760 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -566,7 +566,7 @@ function! s:check_node() abort endif let node_v = get(split(s:system('node -v'), "\n"), 0, '') call health#report_info('Node.js: '. node_v) - if !s:shell_error && s:version_cmp(node_v[1:], '6.0.0') < 0 + if s:shell_error || s:version_cmp(node_v[1:], '6.0.0') < 0 call health#report_warn('Neovim node.js host does not support '.node_v) " Skip further checks, they are nonsense if nodejs is too old. return @@ -623,10 +623,51 @@ function! s:check_node() abort endif endfunction +function! s:check_perl() abort + call health#report_start('Perl provider (optional)') + + if s:disabled_via_loaded_var('perl') + return + endif + + if !executable('perl') || !executable('cpanm') + call health#report_warn( + \ '`perl` and `cpanm` must be in $PATH.', + \ ['Install Perl and cpanminus and verify that `perl` and `cpanm` commands work.']) + return + endif + let perl_v = get(split(s:system(['perl', '-W', '-e', 'print $^V']), "\n"), 0, '') + call health#report_info('Perl: '. perl_v) + if s:shell_error + call health#report_warn('Neovim perl host does not support '.perl_v) + " Skip further checks, they are nonsense if perl is too old. + return + endif + + let host = provider#perl#Detect() + if empty(host) + call health#report_warn('Missing "Neovim::Ext" cpan package.', + \ ['Run in shell: cpanm Neovim::Ext']) + return + endif + call health#report_info('Neovim perl host: '. host) + + let current_perl_cmd = [host, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION'] + let current_perl = s:system(current_perl_cmd) + if s:shell_error + call health#report_error('Failed to run: '. string(current_perl_cmd), + \ ['Report this issue with the output of: ', string(current_perl_cmd)]) + return + endif + + call health#report_ok('"Neovim::Ext" cpan package is installed: '. current_perl) +endfunction + function! health#provider#check() abort call s:check_clipboard() call s:check_python(2) call s:check_python(3) call s:check_ruby() call s:check_node() + call s:check_perl() endfunction From ff9f70a6bfe3206c258c5c25e3148fbe1afd6ed2 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 18 Jan 2020 10:39:12 -0500 Subject: [PATCH 07/11] provider/perl: skip tests on Windows It worked for MINGW builds at one point but it keeps failing now because of perl dependencies or nvim session issues for tests (named pipes as sockets on Windows?). --- test/functional/provider/perl_spec.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index 640fe0f622..38cecae35c 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -20,6 +20,7 @@ before_each(function() end) describe('perl host', function() + if helpers.pending_win32(pending) then return end teardown(function () os.remove('Xtest-perl-hello.pl') os.remove('Xtest-perl-hello-plugin.pl') From da0cd5436b4a50e681f490ec6fc7730a894b1542 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 18 Jan 2020 10:59:17 -0500 Subject: [PATCH 08/11] doc: provider-perl Enable 'has("perl")' as an alias for 'g:loaded_perl_provider'. TODO: - +perl interface --- runtime/doc/provider.txt | 25 +++++++++++++++++++++++++ src/nvim/eval.c | 1 + 2 files changed, 26 insertions(+) diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index 46ff075cef..0a6cdc60e8 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -126,6 +126,31 @@ To use an absolute path (e.g. to an rbenv installation): > To use the RVM "system" Ruby installation: > let g:ruby_host_prog = 'rvm system do neovim-ruby-host' +============================================================================== +Perl integration *provider-perl* + +Nvim supports Perl |remote-plugin|s. +https://github.com/jacquesg/p5-Neovim-Ext + + +PERL QUICKSTART~ + +To use perl remote-plugins with Nvim, install the "Neovim::Ext" cpan package: > + cpanm -n Neovim::Ext + +Run |:checkhealth| to see if your system is up-to-date. + + +PERL PROVIDER CONFIGURATION~ + *g:loaded_perl_provider* +To disable Perl support: > + :let g:loaded_perl_provider = 0 +< + *g:perl_host_prog* +Command to start the Perl executable. Must be set before any +check for has("perl"). > + let g:perl_host_prog = '/path/to/perl' +< ============================================================================== Node.js integration *provider-nodejs* diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 797c61a482..8c4261f4ba 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -24611,6 +24611,7 @@ bool eval_has_provider(const char *feat) && !strequal(feat, "python_dynamic") && !strequal(feat, "python3_compiled") && !strequal(feat, "python3_dynamic") + && !strequal(feat, "perl") && !strequal(feat, "ruby") && !strequal(feat, "node")) { // Avoid autoload for non-provider has() features. From 670a14a2a6a2c9abc97227f0a34712fa8e2e6465 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 18 Jan 2020 13:45:04 -0500 Subject: [PATCH 09/11] provider/perl: add latest version health check --- runtime/autoload/health/provider.vim | 43 +++++++++++++++++++--------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 29abf02760..cc7d86d0c1 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -595,14 +595,12 @@ function! s:check_node() abort \ 'Are you behind a firewall or proxy?']) return endif - if !empty(latest_npm) - try - let pkg_data = json_decode(latest_npm) - catch /E474/ - return 'error: '.latest_npm - endtry - let latest_npm = get(get(pkg_data, 'dist-tags', {}), 'latest', 'unable to parse') - endif + try + let pkg_data = json_decode(latest_npm) + catch /E474/ + return 'error: '.latest_npm + endtry + let latest_npm = get(get(pkg_data, 'dist-tags', {}), 'latest', 'unable to parse') let current_npm_cmd = ['node', host, '--version'] let current_npm = s:system(current_npm_cmd) @@ -646,21 +644,38 @@ function! s:check_perl() abort let host = provider#perl#Detect() if empty(host) - call health#report_warn('Missing "Neovim::Ext" cpan package.', + call health#report_warn('Missing "Neovim::Ext" cpan module.', \ ['Run in shell: cpanm Neovim::Ext']) return endif call health#report_info('Neovim perl host: '. host) - let current_perl_cmd = [host, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION'] - let current_perl = s:system(current_perl_cmd) + let latest_cpan_cmd = 'cpanm --info Neovim::Ext' + let latest_cpan = s:system(latest_cpan_cmd) + if s:shell_error || empty(latest_cpan) + call health#report_error('Failed to run: '. latest_cpan_cmd, + \ ["Make sure you're connected to the internet.", + \ 'Are you behind a firewall or proxy?']) + return + endif + let latest_cpan = matchstr(latest_cpan, '\(\.\?\d\)\+') + + let current_cpan_cmd = [host, '-W', '-MNeovim::Ext', '-e', 'print $Neovim::Ext::VERSION'] + let current_cpan = s:system(current_cpan_cmd) if s:shell_error - call health#report_error('Failed to run: '. string(current_perl_cmd), - \ ['Report this issue with the output of: ', string(current_perl_cmd)]) + call health#report_error('Failed to run: '. string(current_cpan_cmd), + \ ['Report this issue with the output of: ', string(current_cpan_cmd)]) return endif - call health#report_ok('"Neovim::Ext" cpan package is installed: '. current_perl) + if s:version_cmp(current_cpan, latest_cpan) == -1 + call health#report_warn( + \ printf('Module "Neovim::Ext" is out-of-date. Installed: %s, latest: %s', + \ current_cpan, latest_cpan), + \ ['Run in shell: cpanm Neovim::Ext']) + else + call health#report_ok('Latest "Neovim::Ext" cpan module is installed: '. current_cpan) + endif endfunction function! health#provider#check() abort From 7853b6178612f471fb0c580538294fda41555614 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 19 Jan 2020 22:50:11 -0500 Subject: [PATCH 10/11] provider/perl: test older versions --- test/functional/provider/perl_spec.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index 38cecae35c..7b446e4ab3 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -30,7 +30,8 @@ describe('perl host', function() local fname = 'Xtest-perl-hello.pl' write_file(fname, [[ package main; - use v5.22.1; + use strict; + use warnings; use Neovim::Ext; use Neovim::Ext::MsgPack::RPC; @@ -47,6 +48,8 @@ describe('perl host', function() local fname = 'Xtest-perl-hello-plugin.pl' write_file(fname, [[ package TestPlugin; + use strict; + use warnings; use parent qw(Neovim::Ext::Plugin); __PACKAGE__->register; @@ -60,7 +63,8 @@ describe('perl host', function() } package main; - use v5.22.1; + use strict; + use warnings; use Neovim::Ext; use Neovim::Ext::MsgPack::RPC; From b4e4ed844a25aa0ec43404e4ec318d0b54e0e1dd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 20 Jan 2020 19:49:48 -0500 Subject: [PATCH 11/11] ci/Appveyor: respect -NoTest param Skips nodejs and Neovim::Ext. --- ci/build.ps1 | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ci/build.ps1 b/ci/build.ps1 index afef9df6bf..627dc69e88 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -36,18 +36,22 @@ $scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh' Invoke-Expression $scoop } -scoop install diffutils nodejs-lts perl +scoop install diffutils perl diff3 --version -node --version -npm.cmd --version perl --version cpanm.bat --version -cpanm.bat -n Neovim::Ext -if ($LastExitCode -ne 0) { - Get-Content -Path "$env:USERPROFILE\.cpanm\build.log" +if (-not $NoTests) { + scoop install nodejs-lts + node --version + npm.cmd --version + + cpanm.bat -n Neovim::Ext + if ($LastExitCode -ne 0) { + Get-Content -Path "$env:USERPROFILE\.cpanm\build.log" + } + perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'; exitIfFailed } -perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'; exitIfFailed if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) { write-host "cache dir not found: $($env:DEPS_BUILD_DIR)"