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

Updated grammars to latest versions #170

Merged
merged 8 commits into from
Aug 27, 2024
Merged

Conversation

asalvi0
Copy link
Contributor

@asalvi0 asalvi0 commented Aug 25, 2024

Updated all grammars and fixed Ocaml files mapping according to the latest official repo structure.

@smacker
Copy link
Owner

smacker commented Aug 26, 2024

hi @asalvi0 ! Not sure why github didn't trigger a pipeline. But I tried to run it locally and it fails with the following:

❯ go test ./...
# github.com/smacker/go-tree-sitter/lua
parser.c:254:18: warning: null character(s) preserved in string literal [-Wnull-character]
ok  	github.com/smacker/go-tree-sitter	(cached)
ok  	github.com/smacker/go-tree-sitter/bash	(cached)
ok  	github.com/smacker/go-tree-sitter/c	(cached)
ok  	github.com/smacker/go-tree-sitter/cpp	(cached)
ok  	github.com/smacker/go-tree-sitter/csharp	(cached)
ok  	github.com/smacker/go-tree-sitter/css	(cached)
ok  	github.com/smacker/go-tree-sitter/cue	(cached)
# github.com/smacker/go-tree-sitter/dockerfile.test
/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64/link: running cc failed: exit status 1
Undefined symbols for architecture arm64:
  "_tree_sitter_dockerfile_external_scanner_create", referenced from:
      _tree_sitter_dockerfile.language in 000002.o
  "_tree_sitter_dockerfile_external_scanner_deserialize", referenced from:
      _tree_sitter_dockerfile.language in 000002.o
  "_tree_sitter_dockerfile_external_scanner_destroy", referenced from:
      _tree_sitter_dockerfile.language in 000002.o
  "_tree_sitter_dockerfile_external_scanner_scan", referenced from:
      _tree_sitter_dockerfile.language in 000002.o
  "_tree_sitter_dockerfile_external_scanner_serialize", referenced from:
      _tree_sitter_dockerfile.language in 000002.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

FAIL	github.com/smacker/go-tree-sitter/dockerfile [build failed]
ok  	github.com/smacker/go-tree-sitter/elixir	(cached)
ok  	github.com/smacker/go-tree-sitter/elm	(cached)
ok  	github.com/smacker/go-tree-sitter/golang	(cached)
ok  	github.com/smacker/go-tree-sitter/groovy	(cached)
ok  	github.com/smacker/go-tree-sitter/hcl	(cached)
ok  	github.com/smacker/go-tree-sitter/html	(cached)
ok  	github.com/smacker/go-tree-sitter/java	(cached)
ok  	github.com/smacker/go-tree-sitter/javascript	(cached)
--- FAIL: TestGrammar (0.00s)
    binding_test.go:28:
        	Error Trace:	binding_test.go:28
        	Error:      	Not equal:
        	            	expected: "(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) (function_body (statements (property_declaration (binding_pattern_kind) (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (string_content) (interpolated_identifier))))))))))"
        	            	actual  : "(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) (function_body (statements (property_declaration (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (interpolated_identifier))))))))))"

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) (function_body (statements (property_declaration (binding_pattern_kind) (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (string_content) (interpolated_identifier))))))))))
        	            	+(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) (function_body (statements (property_declaration (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (interpolated_identifier))))))))))
        	Test:       	TestGrammar
FAIL
FAIL	github.com/smacker/go-tree-sitter/kotlin	0.186s
ok  	github.com/smacker/go-tree-sitter/lua	(cached)
ok  	github.com/smacker/go-tree-sitter/markdown	(cached)
ok  	github.com/smacker/go-tree-sitter/markdown/tree-sitter-markdown	(cached)
ok  	github.com/smacker/go-tree-sitter/markdown/tree-sitter-markdown-inline	(cached)
# github.com/smacker/go-tree-sitter/ocaml
parser.c:1:10: fatal error: 'tree_sitter/parser.h' file not found
FAIL	github.com/smacker/go-tree-sitter/ocaml [build failed]
ok  	github.com/smacker/go-tree-sitter/php	(cached)
ok  	github.com/smacker/go-tree-sitter/protobuf	(cached)
ok  	github.com/smacker/go-tree-sitter/python	(cached)
ok  	github.com/smacker/go-tree-sitter/ruby	(cached)
ok  	github.com/smacker/go-tree-sitter/rust	(cached)
ok  	github.com/smacker/go-tree-sitter/scala	(cached)
ok  	github.com/smacker/go-tree-sitter/sql	(cached)
ok  	github.com/smacker/go-tree-sitter/svelte	(cached)
ok  	github.com/smacker/go-tree-sitter/swift	(cached)
ok  	github.com/smacker/go-tree-sitter/toml	(cached)
# github.com/smacker/go-tree-sitter/typescript/tsx
parser.c:1:10: fatal error: 'tree_sitter/parser.h' file not found
FAIL	github.com/smacker/go-tree-sitter/typescript/tsx [build failed]
# github.com/smacker/go-tree-sitter/typescript/typescript
parser.c:1:10: fatal error: 'tree_sitter/parser.h' file not found
FAIL	github.com/smacker/go-tree-sitter/typescript/typescript [build failed]
ok  	github.com/smacker/go-tree-sitter/yaml	(cached)
FAIL

@asalvi0 asalvi0 changed the title Update grammars Updated grammars to latest versions Aug 26, 2024
@asalvi0
Copy link
Contributor Author

asalvi0 commented Aug 26, 2024

hi @asalvi0 ! Not sure why github didn't trigger a pipeline. But I tried to run it locally and it fails with the following:

@smacker I've updated some files to fix the tests. All tests are passing locally now.

@smacker smacker merged commit a85ceeb into smacker:master Aug 27, 2024
4 checks passed
@smacker
Copy link
Owner

smacker commented Aug 27, 2024

thank you

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 this pull request may close these issues.

2 participants