Skip to content
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

epuppet type detection is not working correctly in vim 8.0 #154

Open
lelutin opened this issue Sep 15, 2024 · 0 comments · May be fixed by #156
Open

epuppet type detection is not working correctly in vim 8.0 #154

lelutin opened this issue Sep 15, 2024 · 0 comments · May be fixed by #156

Comments

@lelutin
Copy link
Collaborator

lelutin commented Sep 15, 2024

In the recent CI update that @shadowwa made, we've uncovered that vim 8.0 has failures for automatic type detection of epuppet.

There are apparently two issues that popped up in the non-pending tests (e.g. the ones without TODO in the description):

  • type 'epuppet' is replaced with 'mason'
  • the default subtype 'sh' is not used

This module has not yet clearly stated which versions of vim and neovim were supported, but 8.0 is fairly recent enough that we can just try and fix the issues.

The output from the CI job that shows the test errors:

Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
Vader note: cannot print to stderr reliably/directly.  Please consider using Vim's -es/-Es option (mode=n).
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 15 2024 19:50:04)
Compiled by runner@fv-az529-656
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     -gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
+clientserver    +insert_expand   +packages        -toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        -perl            +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       -python          +vreplace
+cscope          +lispindent      -python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      -lua             +rightleft       +writebackup
+diff            +menu            -ruby            +X11
+digraphs        +mksession       +scrollbind      +xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      -mouseshape      +startuptime     +xsmp_interact
+eval            +mouse_dec       +statusline      +xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax          
+farsi           +mouse_netterm   +tag_binary      
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/home/runner/vim-v8.0.0000/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim    -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux           

Starting Vader: 18 suite(s), 54 case(s)
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/filetype/epuppet.vader
    (1/7) [EXECUTE] Filetype detection on a new empty file
    (2/7) [EXECUTE] epuppet test_with_leading_tag
    (2/7) [EXECUTE] (X) 'epuppet' should be equal to 'mason'
    (3/7) [EXECUTE] TODO: epuppet perl with shebang
    (3/7) [EXECUTE] (X) 'epuppet' should be equal to 'perl'
    (4/7) [EXECUTE] epuppet default to shell
    (4/7) [EXECUTE] (X) 'epuppet' should be equal to 'sh'
    (5/7) [EXECUTE] epuppet shell with extension
    (6/7) [EXECUTE] epuppet php with extension
    (7/7) [EXECUTE] TODO: epuppet apache conf with path and extension
    (7/7) [EXECUTE] (X) 'epuppet' should be equal to 'apache'
  Success/Total: 3/7 (2 pending)
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/filetype/puppet.vader
    (1/1) [EXECUTE] Load simple puppet file
    (1/1) [   THEN] Detected simple.pp as a puppet file
  Success/Total: 1/1
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/filetype/puppetfile.vader
    (1/1) [EXECUTE] Load Puppetfile
    (1/1) [   THEN] Detected Puppetfile as a ruby file
  Success/Total: 1/1
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/format/hashrocket.vader
    (1/3) [  GIVEN] simple resource without hashrocket alignment
    (1/3) [     DO] autoformat resource while adding new parameter
    (1/3) [ EXPECT] formated resource
    (2/3) [  GIVEN] simple resource with gq
    (2/3) [     DO] format resource
    (2/3) [ EXPECT] formated resource
    (3/3) [  GIVEN] comment with code snippet with hashrocket
    (3/3) [     DO] Add hashrocket in second example
    (3/3) [ EXPECT] example1 untouched
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/format/textwidth.vader
    (1/3) [  GIVEN] long line
    (1/3) [     DO] format all text
    (1/3) [ EXPECT] nothing changed
    (2/3) [  GIVEN] long line
    (2/3) [     DO] format all text with textwidth set
    (2/3) [ EXPECT] comment is wrapped into more lines
    (3/3) [  GIVEN] long line before editing
    (3/3) [     DO] type in some more on long line
    (3/3) [ EXPECT] formatting did not change line
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/indent/basic.vader
    (1/3) [  GIVEN] class with includes
    (1/3) [     DO] full text indent with '='
    (1/3) [ EXPECT] indented class
    (2/3) [  GIVEN] class with includes
    (2/3) [     DO] full text indent with 'gq' in Visual Mode
    (2/3) [ EXPECT] indented class
    (3/3) [  GIVEN] class with includes and resources
    (3/3) [     DO] full text indent by gq with motion
    (3/3) [ EXPECT] indented class
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/indent/comments_strings.vader
    (1/4) [  GIVEN] comments before closing brace
    (1/4) [     DO] full text indent with '='
    (1/4) [ EXPECT] closing brace back aligned with start of resource block
    (2/4) [  GIVEN] closing brace after comment that contains closing brace
    (2/4) [     DO] full text indent with '='
    (2/4) [ EXPECT] closing brace back aligned with start of resource block
    (3/4) [  GIVEN] multi-line string
    (3/4) [     DO] full text indent with '='
    (3/4) [ EXPECT] multi-line string does not move and line after resumes indentation
    (4/4) [  GIVEN] square bracket and hash sign
    (4/4) [     DO] New line
    (4/4) [ EXPECT] indent stays the same
  Success/Total: 4/4
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/indent/include.vader
    (1/3) [  GIVEN] include of multiple classes over multiple lines
    (1/3) [     DO] full text indent with '='
    (1/3) [ EXPECT] indented include
    (2/3) [  GIVEN] resource with param named include
    (2/3) [     DO] full text indent with '='
    (2/3) [ EXPECT] properly aligned parameters
    (3/3) [  GIVEN] resource with param named include contained in class
    (3/3) [     DO] full text indent with '='
    (3/3) [ EXPECT] second contained resource should align with the first one
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/array.vader
    (1/4) [  GIVEN] simple array
    (1/4) [EXECUTE] syntax is good
    (2/4) [  GIVEN] empty array
    (2/4) [EXECUTE] syntax is good
    (3/4) [  GIVEN] nested array
    (3/4) [EXECUTE] syntax is good
    (4/4) [  GIVEN] array with nested hash
    (4/4) [EXECUTE] syntax is good
  Success/Total: 4/4
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/boolean.vader
    (1/2) [  GIVEN] true
    (1/2) [EXECUTE] syntax is good
    (2/2) [  GIVEN] false
    (2/2) [EXECUTE] syntax is good
  Success/Total: 2/2
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/epuppet.vader
    (1/3) [  GIVEN] template with litteral content puppet tags
    (1/3) [EXECUTE] litteral content syntax must be correct
    (2/3) [  GIVEN] template with litteral content puppet tags
    (2/3) [EXECUTE] epp delimiter syntax must be correct
    (3/3) [  GIVEN] template with litteral content puppet tags
    (3/3) [EXECUTE] puppet syntax must be correct
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/error.vader
    (1/4) [  GIVEN] space errors in and around resource
    (1/4) [EXECUTE] errors identified with syntax
    (2/4) [  GIVEN] space errors inside a class argument list and body, and around comments
    (2/4) [EXECUTE] errors identified with syntax
    (3/4) [  GIVEN] space errors within brackets and braces
    (3/4) [EXECUTE] errors identified with syntax
    (4/4) [  GIVEN] invalid resource names
    (4/4) [EXECUTE] errors identified with syntax
  Success/Total: 4/4
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/fold.vader
    (1/1) [  GIVEN] basic class
    (1/1) [EXECUTE] fold level # in code block
  Success/Total: 1/1
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/number.vader
    (1/5) [  GIVEN] hexidecimal
    (1/5) [EXECUTE] syntax is good
    (2/5) [  GIVEN] integer
    (2/5) [EXECUTE] syntax is good
    (3/5) [  GIVEN] octal
    (3/5) [EXECUTE] syntax is good
    (4/5) [  GIVEN] floating point
    (4/5) [EXECUTE] syntax is good
    (5/5) [  GIVEN] malformed numbers
    (5/5) [EXECUTE] syntax shows error
  Success/Total: 5/5
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/regex.vader
    (1/1) [  GIVEN] division operation
    (1/1) [EXECUTE] syntax is good
  Success/Total: 1/1
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/strings.vader
    (1/2) [  GIVEN] heredoc with trailing comma on first line
    (1/2) [EXECUTE] syntax is undisturbed by trailing comma or apostrophe
    (2/2) [  GIVEN] heredoc with simple closing symbol
    (2/2) [EXECUTE] closing symbol properly ends syntax group
  Success/Total: 2/2
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/variable.vader
    (1/3) [  GIVEN] local variables
    (1/3) [EXECUTE] syntax is good
    (2/3) [  GIVEN] global scope variables
    (2/3) [EXECUTE] syntax is good
    (3/3) [  GIVEN] out of scope qualified name variables
    (3/3) [EXECUTE] syntax is good
  Success/Total: 3/3
  Starting Vader: /home/runner/work/vim-puppet/vim-puppet/test/syntax/variable_in_string.vader
    (1/4) [  GIVEN] interpolated top scope variable
    (1/4) [EXECUTE] syntax is good
    (2/4) [  GIVEN] local variable
    (2/4) [EXECUTE] syntax is good
    (3/4) [  GIVEN] unenclosed local variable
    (3/4) [EXECUTE] syntax is good
    (4/4) [  GIVEN] unenclosed top scope variable
    (4/4) [EXECUTE] syntax is good
  Success/Total: 4/4
Success/Total: 50/54 (2 pending, assertions: 311/315)
Elapsed time: 1.84 sec.
+ vader_exit=1
+ '[' -n '' ']'
+ exit 1
@shadowwa shadowwa linked a pull request Sep 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant