Skip to content

Package.swift: bump ArgumentParser to 1.1.4 #1218

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
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
// The 'swift-argument-parser' version declared here must match that
// used by 'swift-package-manager' and 'sourcekit-lsp'. Please coordinate
// dependency version changes here with those projects.
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.0.1")),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.4")),
]
} else {
package.dependencies += [
Expand Down
23 changes: 12 additions & 11 deletions Utilities/build-script-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
shared_lib_ext = '.dylib'
else:
shared_lib_ext = '.so'
static_lib_ext = '.a'
macos_deployment_target = '10.15'

def error(message):
Expand Down Expand Up @@ -317,45 +318,45 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, tar
# shared libraries into the toolchain lib
package_subpath = args.configuration
for lib in ['libSwiftDriver', 'libSwiftOptions', 'libSwiftDriverExecution']:
install_library(args, build_dir, package_subpath, lib,
install_library(args, build_dir, package_subpath, lib, shared_lib_ext,
universal_lib_dir, toolchain_lib_dir, 'swift-driver', targets)

# Install the swift-tools-support core shared libraries into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-tools-support-core')
for lib in ['libTSCBasic', 'libTSCLibc', 'libTSCUtility']:
install_library(args, build_dir, package_subpath, lib,
install_library(args, build_dir, package_subpath, lib, shared_lib_ext,
universal_lib_dir, toolchain_lib_dir, 'swift-tools-support-core', targets)

# Install the swift-system shared library into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-system')
install_library(args, build_dir, package_subpath, 'libSystemPackage',
install_library(args, build_dir, package_subpath, 'libSystemPackage', shared_lib_ext,
universal_lib_dir, toolchain_lib_dir, 'swift-system', targets)

# Install the swift-argument-parser shared libraries into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'swift-argument-parser')
for lib in ['libArgumentParser', 'libArgumentParserToolInfo']:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DougGregor this is a change I have doubts about, but it apparently makes the error in this CI run go away: https://ci.swift.org/job/swift-PR-macos/5203/console

install_library(args, build_dir, package_subpath, lib,
for (lib, ext) in [('libArgumentParser', shared_lib_ext), ('libArgumentParserToolInfo', static_lib_ext)]:
install_library(args, build_dir, package_subpath, lib, ext,
universal_lib_dir, toolchain_lib_dir,'swift-argument-parser', targets)

# Install the llbuild core shared libraries into the toolchain lib
package_subpath = os.path.join(args.configuration, 'dependencies', 'llbuild')
for lib in ['libllbuildSwift', 'libllbuild']:
install_library(args, build_dir, package_subpath, lib,
install_library(args, build_dir, package_subpath, lib, shared_lib_ext,
universal_lib_dir, toolchain_lib_dir,'llbuild', targets)

# Create a universal shared-library file and install it into the toolchain lib
def install_library(args, build_dir, package_subpath, lib_name,
def install_library(args, build_dir, package_subpath, lib_name, lib_ext,
universal_lib_dir, toolchain_lib_dir, package_name, targets):
shared_lib_file = lib_name + shared_lib_ext
output_dylib_path = os.path.join(universal_lib_dir, shared_lib_file)
lib_file = lib_name + lib_ext
output_dylib_path = os.path.join(universal_lib_dir, lib_file)
lipo_cmd = ['lipo']
for target in targets:
input_lib_path = os.path.join(build_dir, target,
package_subpath, 'lib', shared_lib_file)
package_subpath, 'lib', lib_file)
lipo_cmd.append(input_lib_path)
lipo_cmd.extend(['-create', '-output', output_dylib_path])
subprocess.check_call(lipo_cmd)
install_binary(shared_lib_file, universal_lib_dir, toolchain_lib_dir, args.verbose)
install_binary(lib_file, universal_lib_dir, toolchain_lib_dir, args.verbose)

# Install binary .swiftmodule files for the driver and its dependencies into the toolchain lib
def install_binary_swift_modules(args, build_dir, toolchain_lib_dir, targets):
Expand Down