vala-lang / vala-language-server

Code Intelligence for Vala & Genie
GNU Lesser General Public License v2.1
294 stars 43 forks source link

Source code build fail #294

Closed GZYangKui closed 1 year ago

GZYangKui commented 1 year ago

Describe the bug meson -Dprefix=/usr build execute success ninja -C build execute fail Software OS:Ubuntu 23.04 Valac:0.56.7 To Reproduce Source code repo:

Steps to reproduce the behavior:

Compiling Vala source ../vapi/j...la subprojects/libgee/gee/gee-0.8.vapi
FAILED: src/vala-language-server.p/analysis/codeanalyzer.c src/vala-language-server.p/analysis/codelensanalyzer.c src/vala-language-server.p/analysis/codestyleanalyzer.c src/vala-language-server.p/analysis/inlayhintnodes.c src/vala-language-server.p/analysis/symbolenumerator.c src/vala-language-server.p/codeaction/addotherconstantstoswitchaction.c src/vala-language-server.p/codeaction/adddefaulttoswitchaction.c src/vala-language-server.p/codeaction/baseconverteraction.c src/vala-language-server.p/codeaction/implementmissingprereqsaction.c src/vala-language-server.p/codehelp/callhierarchy.c src/vala-language-server.p/codehelp/codeaction.c src/vala-language-server.p/codehelp/codehelp.c src/vala-language-server.p/codehelp/codelensengine.c src/vala-language-server.p/codehelp/completionengine.c src/vala-language-server.p/codehelp/find_scope.c src/vala-language-server.p/codehelp/formatter.c src/vala-language-server.p/codehelp/nodesearch.c src/vala-language-server.p/codehelp/signaturehelpengine.c src/vala-language-server.p/codehelp/symbolextractor.c src/vala-language-server.p/codehelp/symbolreferences.c src/vala-language-server.p/codehelp/symbolvisitor.c src/vala-language-server.p/codehelp/typehierarchy.c src/vala-language-server.p/documentation/cnamemapper.c src/vala-language-server.p/documentation/doccomment.c src/vala-language-server.p/documentation/girdocumentation.c src/vala-language-server.p/projects/buildtarget.c src/vala-language-server.p/projects/buildtask.c src/vala-language-server.p/projects/ccproject.c src/vala-language-server.p/projects/compilation.c src/vala-language-server.p/projects/defaultproject.c src/vala-language-server.p/projects/filecache.c src/vala-language-server.p/projects/mesonproject.c src/vala-language-server.p/projects/project.c src/vala-language-server.p/projects/textdocument.c src/vala-language-server.p/projects/types.c src/vala-language-server.p/protocol.c src/vala-language-server.p/reporter.c src/vala-language-server.p/request.c src/vala-language-server.p/server.c src/vala-language-server.p/config.c src/vala-language-server.p/util.c src/vala-language-server.p/version.c 
valac -C --debug --debug --define=WITH_JSONRPC_GLIB_3_30 --target-glib=auto --enable-gobject-tracing --fatal-warnings --pkg gio-unix-2.0 --pkg posix --pkg libvala-0.56 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory src/vala-language-server.p --basedir ../src ../vapi/jsonrpc-glib-1.0.vapi ../src/analysis/codeanalyzer.vala ../src/analysis/codelensanalyzer.vala ../src/analysis/codestyleanalyzer.vala ../src/analysis/inlayhintnodes.vala ../src/analysis/symbolenumerator.vala ../src/codeaction/addotherconstantstoswitchaction.vala ../src/codeaction/adddefaulttoswitchaction.vala ../src/codeaction/baseconverteraction.vala ../src/codeaction/implementmissingprereqsaction.vala ../src/codehelp/callhierarchy.vala ../src/codehelp/codeaction.vala ../src/codehelp/codehelp.vala ../src/codehelp/codelensengine.vala ../src/codehelp/completionengine.vala ../src/codehelp/find_scope.vala ../src/codehelp/formatter.vala ../src/codehelp/nodesearch.vala ../src/codehelp/signaturehelpengine.vala ../src/codehelp/symbolextractor.vala ../src/codehelp/symbolreferences.vala ../src/codehelp/symbolvisitor.vala ../src/codehelp/typehierarchy.vala ../src/documentation/cnamemapper.vala ../src/documentation/doccomment.vala ../src/documentation/girdocumentation.vala ../src/projects/buildtarget.vala ../src/projects/buildtask.vala ../src/projects/ccproject.vala ../src/projects/compilation.vala ../src/projects/defaultproject.vala ../src/projects/filecache.vala ../src/projects/mesonproject.vala ../src/projects/project.vala ../src/projects/textdocument.vala ../src/projects/types.vala ../src/protocol.vala ../src/reporter.vala ../src/request.vala ../src/server.vala config.vala ../src/util.vala version.vala subprojects/libgee/gee/gee-0.8.vapi
../src/projects/ccproject.vala:50.9-50.12: error: The symbol `Json' could not be found
   50 |         Json.Node? cc_json_root = parser.get_root ();
      |         ^~~~                                         
../src/projects/ccproject.vala:57.18-57.21: error: The symbol `Json' could not be found
   57 |         foreach (Json.Node cc_node in cc_json_root.get_array ().get_elements ()) {
      |                  ^~~~                                                             
../src/projects/mesonproject.vala:197.43-197.46: error: The symbol `Json' could not be found
  197 |     private void load_introspection_json (Json.Parser parser, string build_dir, string command, 
      |                                           ^~~~                                                  
../src/projects/mesonproject.vala:315.9-315.12: error: The symbol `Json' could not be found
  315 |         Json.Node? rd_json_root = dependencies_parser.get_root ();
      |         ^~~~                                                      
../src/projects/mesonproject.vala:322.22-322.25: error: The symbol `Json' could not be found
  322 |             foreach (Json.Node elem_node in rd_json_root.get_array ().get_elements ()) {
      |                      ^~~~                                                               
../src/projects/mesonproject.vala:337.9-337.12: error: The symbol `Json' could not be found
  337 |         Json.Node? tg_json_root = targets_parser.get_root ();
      |         ^~~~                                                 
../src/projects/mesonproject.vala:351.18-351.21: error: The symbol `Json' could not be found
  351 |         foreach (Json.Node elem_node in tg_json_root.get_array ().get_elements ()) {
      |                  ^~~~                                                               
../src/projects/mesonproject.vala:607.9-607.12: error: The symbol `Json' could not be found
  607 |         Json.Node? ccs_json_root = ccs_parser.get_root ();
      |         ^~~~                                              
../src/projects/mesonproject.vala:615.22-615.25: error: The symbol `Json' could not be found
  615 |             foreach (Json.Node elem_node in ccs_json_root.get_array ().get_elements ()) {
      |                      ^~~~                                                                
../src/projects/mesonproject.vala:717.13-717.16: error: The symbol `Json' could not be found
  717 |             Json.Node? bsf_json_root = bs_files_parser.get_root ();
      |             ^~~~                                                   
../src/projects/mesonproject.vala:724.22-724.25: error: The symbol `Json' could not be found
  724 |             foreach (Json.Node elem_node in bsf_json_root.get_array ().get_elements ()) {
      |                      ^~~~                                                                
../src/projects/types.vala:22.36-22.39: error: The symbol `Json' could not be found
   22 |     class CompileCommand : Object, Json.Serializable {
      |                                    ^~~~               
../src/projects/types.vala:28.25-28.28: error: The symbol `Json' could not be found
   28 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/projects/types.vala:32.26-32.29: error: The symbol `Json' could not be found
   32 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/projects/types.vala:42.16-42.19: error: The symbol `Json' could not be found
   42 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/projects/types.vala:46.97-46.100: error: The symbol `Json' could not be found
   46 |         public bool deserialize_property (string property_name, out Value val, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                 ^~~~                      
../src/server.vala:852.54-852.57: error: The symbol `Json' could not be found
  852 |         var doc_diags = new HashMap<Vala.SourceFile, Json.Array?> ();
      |                                                      ^~~~            
../src/projects/types.vala:94.32-94.35: error: The symbol `Json' could not be found
   94 |     class TargetInfo : Object, Json.Serializable {
      |                                ^~~~               
../src/projects/types.vala:103.25-103.28: error: The symbol `Json' could not be found
  103 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/projects/types.vala:107.26-107.29: error: The symbol `Json' could not be found
  107 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/projects/types.vala:119.16-119.19: error: The symbol `Json' could not be found
  119 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/projects/types.vala:123.97-123.100: error: The symbol `Json' could not be found
  123 |         public bool deserialize_property (string property_name, out Value val, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                 ^~~~                      
../src/projects/types.vala:142.21-142.24: error: The symbol `Json' could not be found
  142 |                     Json.Node? language_property = node.get_object ().get_member ("language");
      |                     ^~~~                                                                      
../src/protocol.vala:280.36-280.39: error: The symbol `Json' could not be found
  280 |     class DocumentSymbol : Object, Json.Serializable {
      |                                    ^~~~               
../src/protocol.vala:325.25-325.28: error: The symbol `Json' could not be found
  325 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/protocol.vala:329.26-329.29: error: The symbol `Json' could not be found
  329 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/protocol.vala:339.16-339.19: error: The symbol `Json' could not be found
  339 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:350.99-350.102: error: The symbol `Json' could not be found
  350 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:399.36-399.39: error: The symbol `Json' could not be found
  399 |     class CompletionList : Object, Json.Serializable {
      |                                    ^~~~               
../src/protocol.vala:403.25-403.28: error: The symbol `Json' could not be found
  403 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/protocol.vala:407.26-407.29: error: The symbol `Json' could not be found
  407 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/protocol.vala:417.16-417.19: error: The symbol `Json' could not be found
  417 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:428.99-428.102: error: The symbol `Json' could not be found
  428 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:489.66-489.69: error: The symbol `Json' could not be found
  489 |     class CompletionItem : Object, Gee.Hashable<CompletionItem>, Json.Serializable {
      |                                                                  ^~~~               
../src/protocol.vala:582.25-582.28: error: The symbol `Json' could not be found
  582 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/protocol.vala:586.26-586.29: error: The symbol `Json' could not be found
  586 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/protocol.vala:596.16-596.19: error: The symbol `Json' could not be found
  596 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:610.99-610.102: error: The symbol `Json' could not be found
  610 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:703.42-703.45: error: The symbol `Json' could not be found
  703 |     class SignatureInformation : Object, Json.Serializable {
      |                                          ^~~~               
../src/protocol.vala:709.25-709.28: error: The symbol `Json' could not be found
  709 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/protocol.vala:713.26-713.29: error: The symbol `Json' could not be found
  713 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/protocol.vala:723.16-723.19: error: The symbol `Json' could not be found
  723 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:734.99-734.102: error: The symbol `Json' could not be found
  734 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:739.35-739.38: error: The symbol `Json' could not be found
  739 |     class SignatureHelp : Object, Json.Serializable {
      |                                   ^~~~               
../src/protocol.vala:744.16-744.19: error: The symbol `Json' could not be found
  744 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:756.99-756.102: error: The symbol `Json' could not be found
  756 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:771.27-771.30: error: The symbol `Json' could not be found
  771 |     class Hover : Object, Json.Serializable {
      |                           ^~~~               
../src/protocol.vala:775.25-775.28: error: The symbol `Json' could not be found
  775 |         public new void Json.Serializable.set_property (ParamSpec pspec, Value value) {
      |                         ^~~~                                                           
../src/protocol.vala:779.26-779.29: error: The symbol `Json' could not be found
  779 |         public new Value Json.Serializable.get_property (ParamSpec pspec) {
      |                          ^~~~                                              
../src/protocol.vala:789.16-789.19: error: The symbol `Json' could not be found
  789 |         public Json.Node serialize_property (string property_name, Value value, ParamSpec pspec) {
      |                ^~~~                                                                               
../src/protocol.vala:804.99-804.102: error: The symbol `Json' could not be found
  804 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:840.38-840.41: error: The symbol `Json' could not be found
  840 |     class TextDocumentEdit : Object, Json.Serializable {
      |                                      ^~~~               
../src/protocol.vala:855.16-855.19: error: The symbol `Json' could not be found
  855 |         public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                ^~~~                                                                                         
../src/protocol.vala:868.109-868.112: error: The symbol `Json' could not be found
  868 |         public bool deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node) {
      |                                                                                                             ^~~~                      
../src/protocol.vala:873.42-873.45: error: The symbol `Json' could not be found
  873 |     abstract class CommandLike : Object, Json.Serializable {
      |                                          ^~~~               
../src/protocol.vala:884.16-884.19: error: The symbol `Json' could not be found
  884 |         public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                ^~~~                                                                                         
../src/protocol.vala:897.109-897.112: error: The symbol `Json' could not be found
  897 |         public bool deserialize_property (string property_name, out GLib.Value value, GLib.ParamSpec pspec, Json.Node property_node) {
      |                                                                                                             ^~~~                      
../src/protocol.vala:993.39-993.42: error: The symbol `Json' could not be found
  993 |     class CodeActionContext : Object, Json.Serializable {
      |                                       ^~~~               
../src/protocol.vala:997.99-997.102: error: The symbol `Json' could not be found
  997 |         public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
      |                                                                                                   ^~~~                      
../src/protocol.vala:1013.32-1013.35: error: The symbol `Json' could not be found
 1013 |     class CodeAction : Object, Json.Serializable {
      |                                ^~~~               
../src/protocol.vala:1028.25-1028.28: error: The symbol `Json' could not be found
 1028 |         public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                         ^~~~                                                                                         
../src/protocol.vala:1040.35-1040.38: error: The symbol `Json' could not be found
 1040 |     class WorkspaceEdit : Object, Json.Serializable {
      |                                   ^~~~               
../src/protocol.vala:1043.16-1043.19: error: The symbol `Json' could not be found
 1043 |         public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                ^~~~                                                                                         
../src/protocol.vala:1065.39-1065.42: error: The symbol `Json' could not be found
 1065 |     class CallHierarchyItem : Object, Json.Serializable {
      |                                       ^~~~               
../src/protocol.vala:1074.25-1074.28: error: The symbol `Json' could not be found
 1074 |         public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                         ^~~~                                                                                         
../src/protocol.vala:1112.39-1112.42: error: The symbol `Json' could not be found
 1112 |     class CallHierarchyIncomingCall : Json.Serializable, Object {
      |                                       ^~~~                       
../src/protocol.vala:1123.25-1123.28: error: The symbol `Json' could not be found
 1123 |         public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                         ^~~~                                                                                         
../src/protocol.vala:1133.39-1133.42: error: The symbol `Json' could not be found
 1133 |     class CallHierarchyOutgoingCall : Json.Serializable, Object {
      |                                       ^~~~                       
../src/protocol.vala:1144.25-1144.28: error: The symbol `Json' could not be found
 1144 |         public override Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
      |                         ^~~~                                                                                         
../src/protocol.vala:1154.29-1154.32: error: The symbol `Json' could not be found
 1154 |     class InlayHintParams : Json.Serializable, Object {
      |                             ^~~~                       
../src/protocol.vala:1174.39-1174.42: error: The symbol `Json' could not be found
 1174 |     class TypeHierarchyItem : Object, Json.Serializable {
      |                                       ^~~~               
Compilation failed: 71 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.
GZYangKui commented 1 year ago

I added the vala compilation parameter "add_project_arguments (['-- pkg=json glib-1.0'], language: 'vala')" to the project meson.build and successfully linked it. Is this a bug in the project

benwaffle commented 1 year ago

@GZYangKui does that mean we can close this issue?

GZYangKui commented 1 year ago

yes

---- Replied Message ---- | From | Ben @.> | | Date | 08/04/2023 02:30 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [vala-lang/vala-language-server] Source code build fail (Issue #294) |

@GZYangKui does that mean we can close this issue?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Prince781 commented 1 year ago

Closing

ajwerner commented 2 months ago

I also hit this, I didn't figure out how to fix it.