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

swift: 5.0.2 -> 5.1.1 #72120

Merged
merged 3 commits into from Jan 17, 2020
Merged

swift: 5.0.2 -> 5.1.1 #72120

merged 3 commits into from Jan 17, 2020

Conversation

mroi
Copy link
Contributor

@mroi mroi commented Oct 27, 2019

Motivation for this change

Update from 5.0.2 to 5.1.1. I did some cleanup in the preceding patches to minimize and clarify the changes. This PR therefore supersedes #68346.

Indexstore and Sourcekit are now mandatory in the build configuration we are using, so I added them, which was rather straightforward. I need to set CC to the wrapped clang now, so that building of swift packages picks up the wrapped compiler, helping the build to find correct headers and libraries.

The patch for bug SR-10559 could be removed, because the fix is now upstream. A new workaround for LLVM bug 39743 got added (see CCC_OVERRIDE_OPTIONS).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @dtzWill

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
executable seems to work (didn't really do much testing)

[16 built, 1 copied (0.0 MiB), 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/72120
1 package were build:
swift

it's a big boy

[nix-shell:/home/jon/.cache/nix-review/pr-72120]$ nix path-info -Sh ./results/swift
/nix/store/pyq15ga5rd4v6b9mv8nihi4bwnc5wha8-swift-5.1.1    1.3G

fetch = { repo, sha256, fetchSubmodules ? false }:
fetchFromGitHub {
owner = "apple";
inherit repo sha256 fetchSubmodules;
rev = tag;
rev = "refs/tags/swift-${version}-RELEASE";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rev = "refs/tags/swift-${version}-RELEASE";
rev = "swift-${version}-RELEASE";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this. I updated my branch with this change.

@jonringer
Copy link
Contributor

@GrahamcOfBorg build swift

@mroi
Copy link
Contributor Author

mroi commented Oct 28, 2019

Thanks for testing on NixOS. I did some more testing of swift itself and did not find any problems.

I agree it’s a fairly large closure, but the increment with this is update is just 12% (from 1283819840 to 1431600328). I think this is acceptable, given that more things are included and swift as a language grew quite a bit from version 4 to 5.

@jonringer
Copy link
Contributor

I mean, it includes clang + llvm and quite a bit of a toolchain, not supprising given this.... just making an observation :)

@mroi
Copy link
Contributor Author

mroi commented Oct 28, 2019

Understood. Yes, they require a modified, internal clang, which is a bit annoying.

@dtzWill
Copy link
Member

dtzWill commented Oct 28, 2019

LGTM after basic building + test, will hopefully put through more serious paces in a few days but don't want to stall anything waiting on that. (worst case I file an issue/PR if anything problematic is encountered)

@mroi
Copy link
Contributor Author

mroi commented Oct 28, 2019

I just ran the internal test suite by setting doCheck to true. Just three unexpected failures that look like Nix build issues rather than something wrong with the swift tools. The other thousands of tests were successful or expected failures.

@dtzWill
Copy link
Member

dtzWill commented Nov 5, 2019

So close! Can we disable those, and do you have logs perhaps? Just curious what failures we run into. I think this is ready as-is, but even better if we can start testing any part of (or most of) this!
Although I don't know if I can handle seeing the build fail due to a test after making it through everything else :P. Nevermind iterating on test fixups, although hopefully that could be done with a nix-shell or so...

@mroi
Copy link
Contributor Author

mroi commented Nov 6, 2019

Here are the log snippets of the failing tests:

Driver/static-stdlib-linux.swift
FAIL: Swift(linux-x86_64) :: Driver/static-stdlib-linux.swift (4531 of 12037)
******************** TEST 'Swift(linux-x86_64) :: Driver/static-stdlib-linux.swift' FAILED ********************
Script:
--
: 'RUN: at line 5';   rm -rf "/build/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-stdlib-linux.swift.tmp" && mkdir -p "/build/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-stdlib-linux.swift.tmp"
: 'RUN: at line 6';   /build/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -target x86_64-unknown-linux-gnu  -module-cache-path '/build/build/buildbot_linux/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -static-stdlib -o /build/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-stdlib-linux.swift.tmp/static-stdlib /build/src/swift/test/Driver/static-stdlib-linux.swift
: 'RUN: at line 7';   /build/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-stdlib-linux.swift.tmp/static-stdlib | '/nix/store/jskxc2wfzq6zdar1iix0x218lbp18kn6-python-2.7.16/bin/python' '/build/src/swift/utils/PathSanitizingFileCheck' --sanitize BUILD_DIR='/build/build/buildbot_linux/swift-linux-x86_64' --sanitize SOURCE_DIR='/build/src/swift' --use-filecheck '/build/build/buildbot_linux/llvm-linux-x86_64/bin/FileCheck' /build/src/swift/test/Driver/static-stdlib-linux.swift
: 'RUN: at line 8';   ldd /build/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-stdlib-linux.swift.tmp/static-stdlib | '/nix/store/jskxc2wfzq6zdar1iix0x218lbp18kn6-python-2.7.16/bin/python' '/build/src/swift/utils/PathSanitizingFileCheck' --sanitize BUILD_DIR='/build/build/buildbot_linux/swift-linux-x86_64' --sanitize SOURCE_DIR='/build/src/swift' --use-filecheck '/build/build/buildbot_linux/llvm-linux-x86_64/bin/FileCheck' /build/src/swift/test/Driver/static-stdlib-linux.swift --check-prefix=LDD
--
Exit Code: 1

Command Output (stderr):
--
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: cannot find -licui18n
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: cannot find -licuuc
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(gload.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(gstore.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(gcas.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(lock.o): requires unsupported dynamic reloc 11; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(load_16_.o): requires dynamic R_X86_64_32 reloc against 'libat_load_16_i1' which may overflow at runtime; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(store_16_.o): requires dynamic R_X86_64_32 reloc against 'libat_store_16_i1' which may overflow at runtime; recompile with -fPIC
/nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld.gold: error: /nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/lib64/gcc/x86_64-unknown-linux-gnu/8.3.0/../../../../lib64/libatomic.a(cas_16_.o): requires dynamic R_X86_64_32 reloc against 'libat_compare_exchange_16_i1' which may overflow at runtime; recompile with -fPIC
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToUpper: error: undefined reference to 'u_strToUpper_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToLower: error: undefined reference to 'u_strToLower_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_close: error: undefined reference to 'ubrk_close_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_open: error: undefined reference to 'ubrk_open_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_preceding: error: undefined reference to 'ubrk_preceding_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_following: error: undefined reference to 'ubrk_following_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setText: error: undefined reference to 'ubrk_setText_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_ubrk_setUText: error: undefined reference to 'ubrk_setUText_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUTF8: error: undefined reference to 'utext_openUTF8_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_utext_openUChars: error: undefined reference to 'utext_openUChars_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_hasBoundaryBefore: error: undefined reference to 'unorm2_hasBoundaryBefore_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_getNFCInstance: error: undefined reference to 'unorm2_getNFCInstance_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_normalize: error: undefined reference to 'unorm2_normalize_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_unorm2_spanQuickCheckYes: error: undefined reference to 'unorm2_spanQuickCheckYes_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_hasBinaryProperty: error: undefined reference to 'u_hasBinaryProperty_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charAge: error: undefined reference to 'u_charAge_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getIntPropertyValue: error: undefined reference to 'u_getIntPropertyValue_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_charName: error: undefined reference to 'u_charName_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToLower: error: undefined reference to 'u_strToLower_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToTitle: error: undefined reference to 'u_strToTitle_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_strToUpper: error: undefined reference to 'u_strToUpper_64'
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift_static/linux/libswiftCore.a(UnicodeNormalization.cpp.o):UnicodeNormalization.cpp:function __swift_stdlib_u_getNumericValue: error: undefined reference to 'u_getNumericValue_64'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
stdlib/CUUID.swift
FAIL: Swift(linux-x86_64) :: stdlib/CUUID.swift (11332 of 12037)
******************** TEST 'Swift(linux-x86_64) :: stdlib/CUUID.swift' FAILED ********************
Script:
--
: 'RUN: at line 1';   rm -rf "/build/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/CUUID.swift.tmp" && mkdir -p "/build/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/CUUID.swift.tmp" && /build/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -target x86_64-unknown-linux-gnu  -module-cache-path '/build/build/buildbot_linux/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -swift-version 4   -module-cache-path '/build/build/buildbot_linux/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' /build/src/swift/validation-test/stdlib/CUUID.swift -o /build/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/CUUID.swift.tmp/a.out -module-name main  && echo /build/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/CUUID.swift.tmp/a.out &&/nix/store/2gg7a91c98ga07fvyyp2k1bvrds213jr-coreutils-8.31/bin/env DYLD_LIBRARY_PATH='/build/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64' LD_LIBRARY_PATH='/build/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64' SIMCTL_CHILD_DYLD_LIBRARY_PATH='/build/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64'  /build/build/buildbot_linux/swift-linux-x86_64/validation-test-linux-x86_64/stdlib/Output/CUUID.swift.tmp/a.out
--
Exit Code: 1

Command Output (stderr):
--
/build/build/buildbot_linux/swift-linux-x86_64/lib/swift/linux/x86_64/glibc.modulemap:447:10: error: header '/nix/store/m48mayi9siabcix556g1pcccsy3g80kn-glibc-2.27-dev/include/uuid/uuid.h' not found
  header "/nix/store/m48mayi9siabcix556g1pcccsy3g80kn-glibc-2.27-dev/include/uuid/uuid.h"
         ^
/build/src/swift/validation-test/stdlib/CUUID.swift:7:8: error: could not build C module 'CUUID'
import CUUID
       ^
Python/build_swift.swift
FAIL: Swift(linux-x86_64) :: Python/build_swift.swift (11913 of 12037)
******************** TEST 'Swift(linux-x86_64) :: Python/build_swift.swift' FAILED ********************
Script:
--
: 'RUN: at line 10';   /nix/store/jskxc2wfzq6zdar1iix0x218lbp18kn6-python-2.7.16/bin/python -m unittest discover -s /build/src/swift/utils/build_swift/ -t /build/src/swift/utils/
--
Exit Code: 1

Command Output (stderr):
--
.......................................................................................................................................................EEEEEEE.EEEEEEEE.EE..................................E..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
ERROR: test_get_preset_buildbot_linux (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux,foundation=debug (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux,foundation=release (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux,no_test (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux,smoketest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1404 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1404,notest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1510 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1510,notest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1604 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1604,notest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1610 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1610,notest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1804 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_1804,notest (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,aarch64 (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

======================================================================
ERROR: test_get_preset_mixin_linux_installation (build_swift.tests.test_presets.TestPresetParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/src/swift/utils/build_swift/tests/test_presets.py", line 144, in test
    preset_parser.get_preset(preset_name, vars=PRESET_DEFAULTS)
  File "/build/src/swift/utils/build_swift/presets.py", line 336, in get_preset
    preset = self._interpolate_preset_vars(preset, vars)
  File "/build/src/swift/utils/build_swift/presets.py", line 313, in _interpolate_preset_vars
    raise InterpolationError(preset.name, name, value, e.args[0])
InterpolationError: no value found for install_prefix in "%(install_prefix)s"

----------------------------------------------------------------------
Ran 687 tests in 9.050s

FAILED (errors=18)

I already tried some obvious fixes, but so far have not been successful in making these tests succeed.

@mroi
Copy link
Contributor Author

mroi commented Dec 10, 2019

I have updated my changes and enabled the test suite.

One failing test actually pointed to a problem I could fix. The other two look like build system issues to me and I disabled them for now.

@mroi
Copy link
Contributor Author

mroi commented Dec 12, 2019

Apparently I have overlooked a build error. Please hold the line …

@mroi
Copy link
Contributor Author

mroi commented Jan 14, 2020

I forgot to mention after my force push:
This should be ready now. Test suite runs through for me.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM. However, the git history seems to have a lot of fixups. I don't expect this to just be a single commit, but it would be nice for a little consolidation.

https://nixos.org/nixpkgs/manual/#submitting-changes-making-patches

something like:

swift: refactor phase, patches, and docs
swift: 5.0.2 -> 5.1.1
swift: fix build and tests

* simplify versioning
* uniform patch documentation
* reorder phases so they read in order
* reorder scripts for readability
* GNU toolchain dir:
  handle sysroot for GNU toolchain like for C headers, so that
  GCC_INSTALL_PREFIX is actually used correctly
* fix UUID compilation error
  This was pointed out by Swift’s test suite.
* enable tests after build
  Two broken tests disabled for now.
@mroi
Copy link
Contributor Author

mroi commented Jan 15, 2020

Thanks for your patience with this PR.
I rebased onto current master and reorganized the commits per your suggestion.

@jonringer
Copy link
Contributor

all good, swift needs some love like every other package

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

diff LGTM
commits LGTM

[16 built, 6 copied (8.4 MiB), 1.7 MiB DL]
https://github.com/NixOS/nixpkgs/pull/72120
1 package built:
swift

going to merge in a day if no one has any issues

@dtzWill
Copy link
Member

dtzWill commented Jan 17, 2020

Looks great, awesome work! Thanks!

@dtzWill dtzWill merged commit eeb9e74 into NixOS:master Jan 17, 2020
@mroi
Copy link
Contributor Author

mroi commented Jan 17, 2020

Thanks for merging!

@mroi mroi deleted the patch-2 branch January 17, 2020 15:16
@mroi mroi mentioned this pull request Jan 17, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants