Commit Graph

12 Commits

Author SHA1 Message Date
Bryan Ricker
1938bdf841 [Ubuntu] add out-of-the-box SourceKitten support (#5634)
[SourceKitten](https://github.com/jpsim/SourceKitten), a popular Swift
library for interacting with SourceKit, needs to know (or be told) the
location of the sourcekitd framework. SourceKitten is somewhat
[ubiquitous](https://github.com/jpsim/SourceKitten#projects-built-with-sourcekitten);
most Swift projects I've seen or worked on used SourceKitten in some
way.

On macOS, the sourcekit framework is baked-in to the Xcode toolchain(s) and
therefore its location is generally known. On Linux, the location of the
sourcekit framework is wherever swift is installed, which is unknown to
libraries like SourceKitten.

SourceKitten searches for the sourcekit framework in [a few
locations](f7cf1e3b63/Source/SourceKittenFramework/library_wrapper.swift (L51-L104)),
but it's unable to infer the location of the framework on these ubuntu
images. The result when attempting to run any SourceKitten-based tool in
Github Actions on an ubuntu VM is the following error:

```
SourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading libsourcekitdInProc.so failed
/home/runner/work/_temp/cb002a5e-1916-4e05-ba4d-f70ad3bb2266.sh: line 1:  3944 Illegal instruction     (core dumped) mint run swiftlint .
```

(to be clear, this error is not specific to the Github Actions ubuntu
VMs. The same error occurs on any Ubuntu system).

Individual users can work around this by setting the following
environment variable:

```
LINUX_SOURCEKIT_LIB_PATH="/usr/share/swift/usr/lib"
```

This is not a good workaround for the following reasons:

1. The end user doesn't necessarily know where swift is installed.
2. A change to the location of the swift installation would break this
   workaround.
3. The error will occur virtually 100% of the time on a user's first
   attempt to run SourceKitten on ubuntu, and takes at least a
   few minutes to troubleshoot. This will quickly add up to a
   non-trivial amount of lost productivity.

So, anyways, my proposal is to just link sourcekitd to a location where
SourceKitten will find it, so most developers don't have to think about it.
`LINUX_SOURCEKIT_LIB_PATH` can be defined by the user if they have an
unusual setup.

Alternative:

- Don't symlink, add `LINUX_SOURCEKIT_LIB_PATH` to `/etc/environment`.
2022-05-31 08:50:57 +02:00
Aleksandr Chebotov
9d80842cc3 [Ubuntu] Add Ubuntu Server 22.04 LTS template (#5454) 2022-05-02 11:46:10 +03:00
Aleksandr Chebotov
01f34021dc [Ubuntu] Remove hard-coded composer version (#5399) 2022-04-13 13:04:04 +03:00
Aleksandr Chebotov
f052b4c10f [Ubuntu] Tight composer version to 2.2.9 for Ubuntu Server 18 (#5321)
* [Ubuntu] Tight composer verstion to 2.2.9 for Ubuntu Server 18

* Remove extra line

* remove double quotes
2022-04-01 11:18:38 +03:00
Dibir Magomedsaygitov
2d46e3f4d9 [Ubuntu] Remove Ubuntu16 related code from the VE repository (#4336) 2021-10-26 15:30:59 +03:00
Mikhail Timofeev
4416d54d30 [Ubuntu] Remove php installation, tests and software docs for Ubuntu 16 (#3541)
* Remove php installation, tests and software docs for Ubuntu 16

* Add openssl 1.1.1k installation as python toolcache depends on it

* Add a comment about openssl installation on Ubuntu 16
2021-06-10 22:33:08 +03:00
Aleksandr Chebotov
487339fb77 [ubuntu] provide package name (#3172) 2021-04-13 17:13:46 +03:00
Aleksandr Chebotov
436d9baa95 [Ubuntu] use pipx to install ansible (#3015)
* use pipx to install ansible

* update info
2021-03-25 12:40:36 +03:00
Vladimir Safonkin
0a768b0726 [Ubuntu] Migrate tests to Pester (#2340)
* Add Pester tests

* Fix incorrect merging

* Remove swift test from installing script

* Minor fix

* Remove Haskell tests from commons tests

* Fix selenium test

* Fix SVN test

* Fix pipx tests

* Debug

* Fix pipx packages test

* Skip pipx for 16.04
2020-12-29 10:02:46 +03:00
Vladimir Safonkin
02c2fbad69 [Ubuntu] Migrate php to Pester tests (#2341)
* Php Pester tests

* Minor fix
2020-12-25 13:02:25 +03:00
Vladimir Safonkin
82b4e13fb0 [Ubuntu] Move Haskell tests to separate file. (#2348)
* Move Haskell tests to separate file

* Minor fix
2020-12-25 12:36:01 +03:00
Vladimir Safonkin
ee8132a978 [Ubuntu] Migrate tests for Haskell to Pester (#2314)
* Add Pester tests for Haskell on Ubuntu

* Add tests for all installed ghc versions

* Minor fix

* Minor fix

* Fix number of installed ghc versions test

* Fix GHC number test
2020-12-24 12:36:37 +03:00