Skip to content

SKCore: allow non python build servers #657

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

Merged
merged 2 commits into from
Oct 25, 2022
Merged

Conversation

RuslanLa
Copy link

The commit 7910520 made build servers Python only. This pull requests adjusts server handling logic to use python interpreter only for the scripts with ".py" extension.

@RuslanLa RuslanLa marked this pull request as ready for review October 21, 2022 17:02
@ahoppen
Copy link
Member

ahoppen commented Oct 21, 2022

Looks good to me but I’d be interested to know what your use case for this ise.

@RuslanLa
Copy link
Author

RuslanLa commented Oct 22, 2022

@ahoppen we are using a build server to integrate language server with Buck and would like to be more flexible with languages choices, in particular we are going to write the build server in Typescript.

@ahoppen ahoppen requested a review from compnerd October 22, 2022 20:06
@ahoppen
Copy link
Member

ahoppen commented Oct 22, 2022

Ah, makes sense. I somehow misread “build server” as “language server” and wondered how you wanted to use this to integrated SourceKit-LSP with another LSP server. Makes total sense now that I read it again.

@ahoppen
Copy link
Member

ahoppen commented Oct 22, 2022

@swift-ci Please test

@ahoppen
Copy link
Member

ahoppen commented Oct 23, 2022

CI failed with the following error

Test Case '-[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs]' started./Users/ec2-user/jenkins/workspace/swift-sourcekit-lsp-PR-macOS/branch-main/sourcekit-lsp/Sources/SKCore/BuildServerBuildSystem.swift:150: error: -[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs] : failed: caught error: "Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error""Test Case '-[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs]' failed (2.974 seconds).Test Suite 'BuildServerBuildSystemTests' failed at 2022-10-22 21:26:30.899.

Could you take a look what’s going wrong here?

throw BuildServerTestError.executableNotFound("python3")
}

serverPath = interpreterPath
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't realize that this was in SKCore, this makes sense. I thought that this was a test-only method, which would be fine to assume that the build server would never be an executable.

@RuslanLa
Copy link
Author

CI failed with the following error

Test Case '-[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs]' started./Users/ec2-user/jenkins/workspace/swift-sourcekit-lsp-PR-macOS/branch-main/sourcekit-lsp/Sources/SKCore/BuildServerBuildSystem.swift:150: error: -[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs] : failed: caught error: "Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error""Test Case '-[SKCoreTests.BuildServerBuildSystemTests testBuildTargetOutputs]' failed (2.974 seconds).Test Suite 'BuildServerBuildSystemTests' failed at 2022-10-22 21:26:30.899.
Could you take a look what’s going wrong here?

@ahoppen I missed dot in comparison of files extension and had "py" instead of ".py", I fixed it.

@ahoppen
Copy link
Member

ahoppen commented Oct 24, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit e151c80 into swiftlang:main Oct 25, 2022
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.

3 participants