Editor suddenly linting, throwing errors and crashes build

Hi all!

I have a sudden problem that is really bizarre to me.

I have done nothing to my code, nothing to the codebase, nothing to the game build to my knowledge.

Monday morning, I go to build my Defold project and it starts linting for the first time ever, takes a very long time to do it, and then throws multiple errors like this:

/lfs/src/lfs.c
	Line 71: In file included from upload/lfs/src/lfs.c:71:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/sdk.h:19:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/engine/extension.h:19:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/dlib/webserver.h:18:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/dlib/socket.h:19:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/dlib/sockettypes.h:21:
In file included from /var/extender/sdk/fd1ad4c17bfdcd890ea7176f2672c35102384419/defoldsdk//sdk/include/dmsdk/dlib/sockettypes_win32.h:19:
In file included from /opt/platformsdk/Win32/WindowsKits/10//Include/10.0.20348.0/um/WinSock2.h:116:
redefinition of 'sockaddr'
  240 | typedef struct sockaddr {
      |                ^

Project will not build as a result. I am using Lua Filesystems, obviously, and that’s where the crash is coming from. I updated those repos to see if that would solve it. Did not. There has been no change in the LFS code to my knowledge (last merge was quite awhile ago).

I did not ask it to start linting, either, and now it suddenly is.

Any help would be greatly appreciated.

I changed the library dependency for LFS to 1.10 instead of ‘master’ and then deleted the build folder & refetched libraries.

Project now builds. It’s possible that there was an edit to the current version of LFS that borked my build, but I don’t know what it was. Reverted to an older “stable” build per Britzl’s suggestions on his page.

But I still have no idea what suddenly went wrong.

1 Like

This is not linting. The Lua Language Server does static code analysis of Lua code. What you shared is a build error from building the Lua File System native code.

I did a very recent update to the LFS extension so that it will be easier to update in the future:

It is very likely that there’s something wrong with that update and if you did not depend on a specific version of the extension you always get the latest version when the dependencies are fetched (happens on project startup).

I will look into the crash and apply a fix and then make a new release.

3 Likes

Fixed the build error and issues a new release:

2 Likes