Hello community, here is the log from the commit of package dub for openSUSE:Factory checked in at 2018-04-17 11:19:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dub (Old) and /work/SRC/openSUSE:Factory/.dub.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dub" Tue Apr 17 11:19:00 2018 rev:8 rq:597227 version:1.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dub/dub.changes 2018-04-16 12:49:30.319985511 +0200 +++ /work/SRC/openSUSE:Factory/.dub.new/dub.changes 2018-04-17 11:19:07.565887094 +0200 @@ -1,0 +2,8 @@ +Mon Apr 16 19:46:59 UTC 2018 - [email protected] + +- Update to 1.8.1 + * Fixed a regression in 1.8.0 that caused linker files specified + as `sourceFiles` to not get inherited properly + issue (gh#dlang/dub#1408) pull (gh#dlang/dub#1409) + +------------------------------------------------------------------- Old: ---- dub-1.8.0.tar.gz New: ---- dub-1.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dub.spec ++++++ --- /var/tmp/diff_new_pack.rWYJKx/_old 2018-04-17 11:19:08.065863659 +0200 +++ /var/tmp/diff_new_pack.rWYJKx/_new 2018-04-17 11:19:08.069863472 +0200 @@ -17,7 +17,7 @@ Name: dub -Version: 1.8.0 +Version: 1.8.1 Release: 0 Summary: Package manager and meta build tool for the D programming language License: MIT ++++++ dub-1.8.0.tar.gz -> dub-1.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/.travis.yml new/dub-1.8.1/.travis.yml --- old/dub-1.8.0/.travis.yml 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/.travis.yml 2018-04-14 18:12:05.000000000 +0200 @@ -58,7 +58,7 @@ - d: gdc-4.8.5 env: [FRONTEND=2.068] - stage: deploy - d: dmd + d: ldc os: osx script: echo "Deploying to GitHub releases ..." && ./release.sh deploy: @@ -69,9 +69,8 @@ api_key: $GH_REPO_TOKEN on: tags: true - - d: dmd - # DMD 32-bit is needed for 32-bit compilation - script: echo "Deploying to GitHub releases ..." && DMD=$(find $HOME/dlang | grep "dmd-.*/linux/bin32/dmd") ./release.sh + - d: ldc + script: echo "Deploying to GitHub releases ..." && ./release.sh env: [ARCH=32] addons: apt: @@ -86,7 +85,7 @@ api_key: $GH_REPO_TOKEN on: tags: true - - d: dmd + - d: ldc script: echo "Deploying to GitHub releases ..." && ./release.sh deploy: - provider: releases @@ -108,7 +107,8 @@ stages: - name: test if: type = pull_request or (type = push and branch = master) - - name: deploy - if: type = push and tag =~ ^v + # Until deployment of the release binaries is fixed, always build them + #- name: deploy + #if: type = push and tag =~ ^v - name: update-latest if: type = push and tag =~ ^v diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/CHANGELOG.md new/dub-1.8.1/CHANGELOG.md --- old/dub-1.8.0/CHANGELOG.md 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/CHANGELOG.md 2018-04-14 18:12:05.000000000 +0200 @@ -1,6 +1,18 @@ Changelog ========= +v1.8.1 - 2018-04-14 +------------------- + +- Fixed a regression in 1.8.0 that caused linker files specified as `sourceFiles` to not get inherited properly - [issue #1408][issue1408], [pull #1409][issue1409] +- Fixed a regression in 1.8.0 that caused `mainSourceFile` to be passed twice to the compiler on Windows - [issue #1407][issue1407], [pull #1410][issue1410] + +[issue1407]: https://github.com/dlang/dub/issues/1407 +[issue1408]: https://github.com/dlang/dub/issues/1408 +[issue1409]: https://github.com/dlang/dub/issues/1409 +[issue1410]: https://github.com/dlang/dub/issues/1410 + + v1.8.0 - 2018-03-01 ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/appveyor.yml new/dub-1.8.1/appveyor.yml --- old/dub-1.8.0/appveyor.yml 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/appveyor.yml 2018-04-14 18:12:05.000000000 +0200 @@ -36,6 +36,7 @@ branches: only: - master + - stable install: - ps: function ResolveLatestDMD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/build.sh new/dub-1.8.1/build.sh --- old/dub-1.8.0/build.sh 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/build.sh 2018-04-14 18:12:05.000000000 +0200 @@ -52,8 +52,8 @@ echo Using existing version file. fi -# For OSX compatibility >= 10.7 -MACOSX_DEPLOYMENT_TARGET=10.7 +# For OSX compatibility >= 10.8 +MACOSX_DEPLOYMENT_TARGET=10.8 echo Running $DMD... $DMD -ofbin/dub -g -O -w -version=DubUseCurl -Isource $* $LIBS @build-files.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/release.sh new/dub-1.8.1/release.sh --- old/dub-1.8.0/release.sh 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/release.sh 2018-04-14 18:12:05.000000000 +0200 @@ -1,17 +1,31 @@ -#!/bin/bash +#!/usr/bin/env bash -set -v -e -o pipefail +set -eux -o pipefail VERSION=$(git describe --abbrev=0 --tags) ARCH="${ARCH:-64}" - +CUSTOM_FLAGS=() unameOut="$(uname -s)" case "$unameOut" in - Linux*) OS=linux; ;; - Darwin*) OS=osx; ;; + Linux*) + OS=linux + CUSTOM_FLAGS+=("-L--export-dynamic") + ;; + Darwin*) + OS=osx + CUSTOM_FLAGS+=("-L-dead_strip") + ;; *) echo "Unknown OS: $unameOut"; exit 1 esac +if [[ $(basename "$DMD") =~ ldmd.* ]] ; then + CUSTOM_FLAGS+=("-flto=full") + # ld.gold is required on Linux + if [ ${OS:-} == "linux" ] ; then + CUSTOM_FLAGS+=("-linker=gold") + fi +fi + case "$ARCH" in 64) ARCH_SUFFIX="x86_64";; 32) ARCH_SUFFIX="x86";; @@ -21,5 +35,5 @@ archiveName="dub-$VERSION-$OS-$ARCH_SUFFIX.tar.gz" echo "Building $archiveName" -DFLAGS="-release -m$ARCH" DMD="$(command -v $DMD)" ./build.sh +DFLAGS="-release -m$ARCH ${CUSTOM_FLAGS[@]}" DMD="$(command -v $DMD)" ./build.sh tar cvfz "bin/$archiveName" -C bin dub diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/source/dub/generators/generator.d new/dub-1.8.1/source/dub/generators/generator.d --- old/dub-1.8.0/source/dub/generators/generator.d 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/source/dub/generators/generator.d 2018-04-14 18:12:05.000000000 +0200 @@ -269,6 +269,7 @@ const depbs = &depti.buildSettings; if (depbs.targetType == TargetType.executable) continue; + // add to (link) dependencies ti.dependencies ~= depname; ti.linkDependencies ~= depname; @@ -404,7 +405,7 @@ parent.addStringImportPaths(child.stringImportPaths); // linking of static libraries is done by parent if (child.targetType == TargetType.staticLibrary) { - parent.addLinkerFiles(child.sourceFiles.filter!isLinkerFile.array); + parent.addSourceFiles(child.sourceFiles.filter!isLinkerFile.array); parent.addLibs(child.libs); parent.addLFlags(child.lflags); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/source/dub/recipe/packagerecipe.d new/dub-1.8.1/source/dub/recipe/packagerecipe.d --- old/dub-1.8.0/source/dub/recipe/packagerecipe.d 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/source/dub/recipe/packagerecipe.d 2018-04-14 18:12:05.000000000 +0200 @@ -169,8 +169,10 @@ if (!this.targetName.empty) dst.targetName = this.targetName; if (!this.workingDirectory.empty) dst.workingDirectory = this.workingDirectory; if (!this.mainSourceFile.empty) { - dst.mainSourceFile = this.mainSourceFile; - dst.addSourceFiles(this.mainSourceFile); + auto p = NativePath(this.mainSourceFile); + p.normalize(); + dst.mainSourceFile = p.toNativeString(); + dst.addSourceFiles(dst.mainSourceFile); } string[] collectFiles(in string[][string] paths_map, string pattern) @@ -297,3 +299,23 @@ return ret; } else static assert(false, "Unsupported type: "~T.stringof); } + +unittest { // issue #1407 - duplicate main source file + { + BuildSettingsTemplate t; + t.mainSourceFile = "./foo.d"; + t.sourceFiles[""] = ["foo.d"]; + BuildSettings bs; + t.getPlatformSettings(bs, BuildPlatform.init, NativePath("/")); + assert(bs.sourceFiles == ["foo.d"]); + } + + version (Windows) {{ + BuildSettingsTemplate t; + t.mainSourceFile = "src/foo.d"; + t.sourceFiles[""] = ["src\\foo.d"]; + BuildSettings bs; + t.getPlatformSettings(bs, BuildPlatform.init, NativePath("/")); + assert(bs.sourceFiles == ["src\\foo.d"]); + }} +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/source/dub/version_.d new/dub-1.8.1/source/dub/version_.d --- old/dub-1.8.0/source/dub/version_.d 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/source/dub/version_.d 2018-04-14 18:12:05.000000000 +0200 @@ -1,2 +1,2 @@ module dub.version_; -enum dubVersion = "v1.8.0"; +enum dubVersion = "v1.8.1"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/fetchzip.sh new/dub-1.8.1/test/fetchzip.sh --- old/dub-1.8.0/test/fetchzip.sh 2018-03-02 18:42:46.000000000 +0100 +++ new/dub-1.8.1/test/fetchzip.sh 2018-04-14 18:12:05.000000000 +0200 @@ -10,7 +10,7 @@ "$DUB" build --single "$DIR"/test_registry.d "$DIR"/test_registry --folder="$DIR/issue1336-registry" --port=$PORT & PID=$! -sleep 0.2 +sleep 1 trap 'kill $PID 2>/dev/null || true' exit echo "Trying to download gitcompatibledubpackage (1.0.4)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/dep.d new/dub-1.8.1/test/issue1408-inherit-linker-files/dep.d --- old/dub-1.8.0/test/issue1408-inherit-linker-files/dep.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/dep.d 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1 @@ +module dep; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/dub.sdl new/dub-1.8.1/test/issue1408-inherit-linker-files/dub.sdl --- old/dub-1.8.0/test/issue1408-inherit-linker-files/dub.sdl 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/dub.sdl 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1,14 @@ +name "test" +targetType "executable" +dependency ":dep" version="*" +sourceFiles "main.d" +// make lib.d available for import +importPaths "." + +subPackage { + name "dep" + sourceFiles "dep.d" + sourceFiles "lib/liblib.a" platform="posix" + sourceFiles "lib/lib.lib" platform="windows" + preBuildCommands "dub build --root=\"$PACKAGE_DIR/lib\"" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/lib/dub.sdl new/dub-1.8.1/test/issue1408-inherit-linker-files/lib/dub.sdl --- old/dub-1.8.0/test/issue1408-inherit-linker-files/lib/dub.sdl 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/lib/dub.sdl 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1,3 @@ +name "lib" +targetType "staticLibrary" +sourceFiles "lib.d" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/lib/lib.d new/dub-1.8.1/test/issue1408-inherit-linker-files/lib/lib.d --- old/dub-1.8.0/test/issue1408-inherit-linker-files/lib/lib.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/lib/lib.d 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1,5 @@ +module lib; + +void foo() +{ +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/lib.d new/dub-1.8.1/test/issue1408-inherit-linker-files/lib.d --- old/dub-1.8.0/test/issue1408-inherit-linker-files/lib.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/lib.d 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1,3 @@ +module lib; + +void foo(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.8.0/test/issue1408-inherit-linker-files/main.d new/dub-1.8.1/test/issue1408-inherit-linker-files/main.d --- old/dub-1.8.0/test/issue1408-inherit-linker-files/main.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.8.1/test/issue1408-inherit-linker-files/main.d 2018-04-14 18:12:05.000000000 +0200 @@ -0,0 +1,6 @@ +import lib; + +void main() +{ + foo(); +}
