Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dub for openSUSE:Factory checked in at 2026-08-15 22:41:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dub (Old) and /work/SRC/openSUSE:Factory/.dub.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dub" Sat Aug 15 22:41:36 2026 rev:29 rq:1371306 version:1.42.0 Changes: -------- --- /work/SRC/openSUSE:Factory/dub/dub.changes 2026-01-12 10:31:27.026519316 +0100 +++ /work/SRC/openSUSE:Factory/.dub.new.1258/dub.changes 2026-08-15 22:42:06.613720792 +0200 @@ -1,0 +2,12 @@ +Fri Aug 14 06:12:38 UTC 2026 - Andrea Manzini <[email protected]> + +- Update to 1.42.0 + * fix #3081: ignore $ROOT_PACKAGE_DIR in source/import path warning + * fix: show clear error when package already exists + * fix: replace Mark(name,0,0) with actual line/column in ReaderException + * fix: auto-create workingDirectory before running executable + * Remove -d alias from --deep to fix conflict with --debug + * Fix debugMode documentation: remove incorrect mention of contracts + * dub.compilers.utils: Add pkg-config C preprocessor flags support + +------------------------------------------------------------------- Old: ---- dub-1.41.0.tar.gz New: ---- dub-1.42.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dub.spec ++++++ --- /var/tmp/diff_new_pack.Kcavfs/_old 2026-08-15 22:42:08.286779684 +0200 +++ /var/tmp/diff_new_pack.Kcavfs/_new 2026-08-15 22:42:08.291779861 +0200 @@ -23,7 +23,7 @@ %bcond_with dcompiler_dmd %endif Name: dub -Version: 1.41.0 +Version: 1.42.0 Release: 0 Summary: Package manager and meta build tool for the D programming language License: MIT ++++++ dub-1.41.0.tar.gz -> dub-1.42.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/.gitignore new/dub-1.42.0/.gitignore --- old/dub-1.41.0/.gitignore 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/.gitignore 2026-08-05 17:14:37.000000000 +0200 @@ -49,6 +49,7 @@ !/test/*/dub.settings.json !/test/*/source/ !/test/*/src/ +!/test/*/api/ # Ignore coverage files cov/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/changelog/add-dest.dd new/dub-1.42.0/changelog/add-dest.dd --- old/dub-1.41.0/changelog/add-dest.dd 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/changelog/add-dest.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -Added `--dest` command line build option. - -Adds support for specifying a root directory for staging, essentially -acts as a prefix to the `targetPath` and `workingDirectory` dubfile -entries. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/changelog/add-frameworks.dd new/dub-1.42.0/changelog/add-frameworks.dd --- old/dub-1.41.0/changelog/add-frameworks.dd 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/changelog/add-frameworks.dd 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -Add `frameworks` dubfile key. - -Adds support for specifying macOS frameworks to link against, -this replaces the need to manually specify frameworks via lflags or dflags. - -Before: -------- -lflags "-framework" "Cocoa" -------- - -After: -------- -frameworks "Cocoa" "OpenGL" -------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/changelog/dustmite-timeout.dd new/dub-1.42.0/changelog/dustmite-timeout.dd --- old/dub-1.41.0/changelog/dustmite-timeout.dd 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.42.0/changelog/dustmite-timeout.dd 2026-08-05 17:14:37.000000000 +0200 @@ -0,0 +1,6 @@ +Added `--timeout` option to `dub dustmite` command. + +Adds a timeout (in seconds) for each oracle invocation, preventing +the dustmite process from hanging indefinitely when the test command +does not terminate. Requires the `timeout` command to be available +(coreutils on Linux/macOS). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/scripts/fish-completion/dub.fish new/dub-1.42.0/scripts/fish-completion/dub.fish --- old/dub-1.41.0/scripts/fish-completion/dub.fish 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/scripts/fish-completion/dub.fish 2026-08-05 17:14:37.000000000 +0200 @@ -88,6 +88,7 @@ complete -c dub -n "contains '$cmd' (commandline -poc)" -l program-status -x -d "Expected program status code" complete -c dub -n "contains '$cmd' (commandline -poc)" -l program-regex -x -d "Program output regular expression" complete -c dub -n "contains '$cmd' (commandline -poc)" -l test-package -x -d "Perform a test run" + complete -c dub -n "contains '$cmd' (commandline -poc)" -l timeout -x -d "Timeout for each oracle invocation in seconds" end for cmd in fetch remove diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/scripts/zsh-completion/_dub new/dub-1.42.0/scripts/zsh-completion/_dub --- old/dub-1.41.0/scripts/zsh-completion/_dub 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/scripts/zsh-completion/_dub 2026-08-05 17:14:37.000000000 +0200 @@ -255,6 +255,7 @@ '--linker-regex=[A regular expression used to match against the linker output]:regex: ' '--program-status=[The expected status code of the built executable]:status code: ' '--program-regex=[A regular expression used to match against the program output]:regex: ' + '--timeout=[Timeout for each oracle invocation in seconds]:seconds: ' '--[End of dub arguments, the following will be sent to the program]' ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/commandline.d new/dub-1.42.0/source/dub/commandline.d --- old/dub-1.41.0/source/dub/commandline.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/commandline.d 2026-08-05 17:14:37.000000000 +0200 @@ -1259,8 +1259,10 @@ { free_args ~= m_templateType; } - dub.createEmptyPackage(NativePath(dir), free_args, m_templateType, m_format, &depCallback, app_args); - + auto targetPath = NativePath(dir.length ? dir : "."); + enforce(!existsFile(targetPath ~ "dub.json") && !existsFile(targetPath ~ "dub.sdl"), + "A dub package already exists in '%s'. Aborting.".format(targetPath.toNativeString())); + dub.createEmptyPackage(targetPath, free_args, m_templateType, m_format, &depCallback, app_args); logInfo("Package successfully created in %s", dir.length ? dir : "."); return 0; } @@ -1558,7 +1560,7 @@ args.getopt("n|non-interactive", &m_nonInteractive, [ "Don't enter interactive mode." ]); - args.getopt("d|deep", &m_deep, [ + args.getopt("deep", &m_deep, [ "Build all dependencies, even when main target is a static library." ]); super.prepare(args); @@ -2726,6 +2728,7 @@ string m_strategy; uint m_jobCount; // zero means not specified bool m_trace; + uint m_timeout; // in seconds, zero means not specified } this() @safe pure nothrow @@ -2757,6 +2760,7 @@ args.getopt("strategy", &m_strategy, ["Set strategy (careful/lookback/pingpong/indepth/inbreadth)"]); args.getopt("j", &m_jobCount, ["Set number of look-ahead processes"]); args.getopt("trace", &m_trace, ["Save all attempted reductions to DIR.trace"]); + args.getopt("timeout", &m_timeout, ["Timeout for each oracle invocation in seconds"]); super.prepare(args); // speed up loading when in test mode @@ -2875,6 +2879,8 @@ logInfo("Starting", Color.light_green, "Executing dustmite..."); auto testcmd = appender!string(); + if (m_timeout) + testcmd.formattedWrite("timeout %s ", m_timeout); testcmd.formattedWrite("%s dustmite --test-package=%s --build=%s --config=%s", std.file.thisExePath, prj.name, this.baseSettings.buildType, this.baseSettings.config); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/compilers/buildsettings.d new/dub-1.42.0/source/dub/compilers/buildsettings.d --- old/dub-1.41.0/source/dub/compilers/buildsettings.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/compilers/buildsettings.d 2026-08-05 17:14:37.000000000 +0200 @@ -365,7 +365,7 @@ enum BuildOption { none = 0, /// Use compiler defaults - debugMode = 1<<0, /// Compile in debug mode (enables contracts, -debug) + debugMode = 1<<0, /// Enables -debug flag (debug statements and identifiers) releaseMode = 1<<1, /// Compile in release mode (disables assertions and bounds checks, -release) coverage = 1<<2, /// Enable code coverage analysis (-cov) debugInfo = 1<<3, /// Enable symbolic debug information (-g) @@ -518,11 +518,11 @@ const hasVar = chain(buildSettingsVars, envVarCache.get.byKey).any!((string var) { return spath.find("$"~var).length > 0 || spath.find("${"~var~"}").length > 0; }); - if (!hasVar) - logWarn("Invalid source/import path: %s", path.toNativeString()); + if (hasVar) + continue; + logWarn("Invalid source/import path: %s", path.toNativeString()); continue; } - auto pstr = path.toNativeString(); foreach (d; dirEntries(pstr, pattern, SpanMode.depth)) { import std.path : baseName, pathSplitter; @@ -670,6 +670,5 @@ deprecated("Use `Flags!BuildOption` instead") public alias BuildOptions = Flags!BuildOption; - deprecated("Use `Flags!BuildRequirement` instead") public alias BuildRequirements = Flags!BuildRequirement; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/compilers/utils.d new/dub-1.42.0/source/dub/compilers/utils.d --- old/dub-1.41.0/source/dub/compilers/utils.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/compilers/utils.d 2026-08-05 17:14:37.000000000 +0200 @@ -148,6 +148,13 @@ } else if (f.startsWith("-Wl,")) settings.addLFlags(f[4 .. $].split(",")); else settings.addLFlags(f); } + + // Also extract C preprocessor flags from pkg-config --cflags + auto cflags = execute([pkgconfig_bin, "--cflags"] ~ pkgconfig_libs); + if (cflags.status == 0) { + logDiagnostic("Using pkg-config to resolve C preprocessor flags for %s.", pkgconfig_libs.join(", ")); + applyPkgConfigCFlags(settings, cflags.output); + } } if (settings.libs.length) logDiagnostic("Using direct -l... flags for %s.", settings.libs.array.join(", ")); } catch (Exception e) { @@ -160,6 +167,68 @@ } +/** + Parses pkg-config --cflags output and applies C preprocessor flags to build settings. + + All C preprocessor flags (-I, -D, -U, -include, -isystem, -idirafter) are passed + to the D compiler via -P prefix (for DMD/LDC) so they get forwarded to the C preprocessor. + This is called from resolveLibs() which runs after cImportPaths are already processed, + so we add directly to dflags with the -P prefix. +*/ +package void applyPkgConfigCFlags(ref BuildSettings settings, string cflagsOutput) +{ + import std.algorithm : splitter, startsWith; + + // Note: We split by whitespace for consistency with --libs parsing above. + // This won't handle shell-quoted paths with spaces, but neither does --libs. + foreach (f; cflagsOutput.splitter()) { + if (f.startsWith("-I") || f.startsWith("-D") || f.startsWith("-U") || + f.startsWith("-include") || f.startsWith("-isystem") || + f.startsWith("-idirafter")) { + // Pass all C preprocessor flags via -P (for DMD/LDC) + settings.addDFlags("-P" ~ f); + } + } +} + +unittest { + BuildSettings settings; + + // Test -I flag extraction (passed via -P prefix) + applyPkgConfigCFlags(settings, "-I/usr/include/foo -I/usr/include/bar"); + assert(settings.dflags == ["-P-I/usr/include/foo", "-P-I/usr/include/bar"]); + + // Test preprocessor define flags + settings = BuildSettings.init; + applyPkgConfigCFlags(settings, "-DFOO=1 -DBAR -UBAZ"); + assert(settings.dflags == ["-P-DFOO=1", "-P-DBAR", "-P-UBAZ"]); + + // Test mixed flags + settings = BuildSettings.init; + applyPkgConfigCFlags(settings, "-I/usr/include -DVERSION=2 -isystem/usr/local/include"); + assert(settings.dflags == ["-P-I/usr/include", "-P-DVERSION=2", "-P-isystem/usr/local/include"]); + + // Test -idirafter flag (attached path) + settings = BuildSettings.init; + applyPkgConfigCFlags(settings, "-idirafter/fallback/include"); + assert(settings.dflags == ["-P-idirafter/fallback/include"]); + + // Note: -include with space-separated argument (e.g., "-include config.h") is not + // fully supported - the flag is passed but the argument may be lost if space-separated. + // Most pkg-config files use attached arguments (e.g., -I/path, -DFOO). + + // Test empty input + settings = BuildSettings.init; + applyPkgConfigCFlags(settings, ""); + assert(settings.dflags.length == 0); + + // Test unknown flags are ignored (e.g., -pthread which is for linker) + settings = BuildSettings.init; + applyPkgConfigCFlags(settings, "-I/inc -pthread -Wall"); + assert(settings.dflags == ["-P-I/inc"]); +} + + /** Searches the given list of compiler flags for ones that have a generic equivalent. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/generators/build.d new/dub-1.42.0/source/dub/generators/build.d --- old/dub-1.41.0/source/dub/generators/build.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/generators/build.d 2026-08-05 17:14:37.000000000 +0200 @@ -601,11 +601,22 @@ } if (settings.buildMode == BuildMode.singleFile && generate_binary) { import std.parallelism, std.range : walkLength; + import std.algorithm : filter, startsWith; auto lbuildsettings = buildsettings; auto srcs = buildsettings.sourceFiles.filter!(f => !isLinkerFile(settings.platform, f)); auto objs = new string[](srcs.walkLength); + // Resolve pkg-config flags early to get C preprocessor flags for compilation. + // We do this on lbuildsettings first, then copy -P flags to buildsettings. + lbuildsettings.sourceFiles = is_static_library ? [] : lbuildsettings.sourceFiles.filter!(f => isLinkerFile(settings.platform, f)).array; + settings.compiler.setTarget(lbuildsettings, settings.platform); + settings.compiler.prepareBuildSettings(lbuildsettings, settings.platform, BuildSetting.commandLineSeparate|BuildSetting.sourceFiles); + + // Copy C preprocessor flags (-P...) from linker settings to compiler settings. + foreach (flag; lbuildsettings.dflags.filter!(f => f.startsWith("-P"))) + buildsettings.addDFlags(flag); + void compileSource(size_t i, string src) { logInfo("Compiling", Color.light_green, "%s", src); const objPath = pathToObjName(settings.platform, src, settings.toolWorkingDirectory); @@ -619,9 +630,6 @@ } logInfo("Linking", Color.light_green, "%s", buildsettings.targetName.color(Mode.bold)); - lbuildsettings.sourceFiles = is_static_library ? [] : lbuildsettings.sourceFiles.filter!(f => isLinkerFile(settings.platform, f)).array; - settings.compiler.setTarget(lbuildsettings, settings.platform); - settings.compiler.prepareBuildSettings(lbuildsettings, settings.platform, BuildSetting.commandLineSeparate|BuildSetting.sourceFiles); settings.compiler.invokeLinker(lbuildsettings, settings.platform, objs, settings.linkCallback, settings.toolWorkingDirectory); // NOTE: separate compile/link is not yet enabled for GDC. @@ -646,6 +654,13 @@ if (generate_binary) settings.compiler.setTarget(lbuildsettings, settings.platform); settings.compiler.prepareBuildSettings(lbuildsettings, settings.platform, BuildSetting.commandLineSeparate|BuildSetting.sourceFiles); + // Copy C preprocessor flags (-P...) from linker settings to compiler settings. + // These come from pkg-config --cflags and are needed for ImportC compilation. + // We must copy them before clearing libs, since resolveLibs extracts them. + import std.algorithm : filter, startsWith; + foreach (flag; lbuildsettings.dflags.filter!(f => f.startsWith("-P"))) + buildsettings.addDFlags(flag); + // setup compiler command line buildsettings.libs = null; buildsettings.frameworks = null; @@ -677,6 +692,7 @@ runcwd = NativePath(buildsettings.workingDirectory); if (!runcwd.absolute) runcwd = cwd ~ runcwd; } + ensureDirectory(runcwd); if (!exe_file_path.absolute) exe_file_path = cwd ~ exe_file_path; runPreRunCommands(m_project.rootPackage, m_project, settings, buildsettings); logInfo("Running", Color.green, "%s %s", exe_file_path.relativeTo(runcwd), run_args.join(" ")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/internal/dyaml/reader.d new/dub-1.42.0/source/dub/internal/dyaml/reader.d --- old/dub-1.41.0/source/dub/internal/dyaml/reader.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/internal/dyaml/reader.d 2026-08-05 17:14:37.000000000 +0200 @@ -91,9 +91,8 @@ auto endianResult = fixUTFByteOrder(buffer); if(endianResult.bytesStripped > 0) { - // TODO: add line and column throw new ReaderException("Size of UTF-16 or UTF-32 input not aligned " ~ - "to 2 or 4 bytes, respectively", Mark(name, 0, 0)); + "to 2 or 4 bytes, respectively", Mark(name, line_, column_)); } version(unittest) { endian_ = endianResult.endian; } @@ -103,17 +102,15 @@ const msg = utf8Result.errorMessage; if(msg !is null) { - // TODO: add line and column - throw new ReaderException("Error when converting to UTF-8: " ~ msg, Mark(name, 0, 0)); + throw new ReaderException("Error when converting to UTF-8: " ~ msg, Mark(name, line_, column_)); } buffer_ = utf8Result.utf8; characterCount_ = utf8Result.characterCount; // Check that all characters in buffer are printable. - // TODO: add line and column enforce(isPrintableValidUTF8(buffer_), - new ReaderException("Special unicode characters are not allowed", Mark(name, 0, 0))); + new ReaderException("Special unicode characters are not allowed", Mark(name, line_, column_))); checkASCII(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/source/dub/version_.d new/dub-1.42.0/source/dub/version_.d --- old/dub-1.41.0/source/dub/version_.d 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/source/dub/version_.d 2026-08-05 17:14:37.000000000 +0200 @@ -1,2 +1,2 @@ module dub.version_; -enum dubVersion = "v1.41.0"; +enum dubVersion = "v1.42.0"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/dustmite-no-redirect.sh new/dub-1.42.0/test/dustmite-no-redirect.sh --- old/dub-1.41.0/test/dustmite-no-redirect.sh 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/test/dustmite-no-redirect.sh 2026-08-05 17:14:37.000000000 +0200 @@ -15,7 +15,7 @@ rm -rf $DM_TMP $DM_TMP.* -$DUB --root=$DM_TEST dustmite --no-redirect --program-status=1 $DM_TMP &> $LOG || true +$DUB --root=$DM_TEST dustmite --no-redirect --program-status=1 --timeout=60 $DM_TMP &> $LOG || true if ! grep -q "$EXPECTED" "$LOG" then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/feat663-search/api/packages/search__q=%22dub-registry%22 new/dub-1.42.0/test/feat663-search/api/packages/search__q=%22dub-registry%22 --- old/dub-1.41.0/test/feat663-search/api/packages/search__q=%22dub-registry%22 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.42.0/test/feat663-search/api/packages/search__q=%22dub-registry%22 2026-08-05 17:14:37.000000000 +0200 @@ -0,0 +1 @@ +[{"name": "dub-registry", "description": "A package registry for the D programming language", "version": "1.0.0"}] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/feat663-search/api/packages/search__q=nonexistent123456789package new/dub-1.42.0/test/feat663-search/api/packages/search__q=nonexistent123456789package --- old/dub-1.41.0/test/feat663-search/api/packages/search__q=nonexistent123456789package 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.42.0/test/feat663-search/api/packages/search__q=nonexistent123456789package 2026-08-05 17:14:37.000000000 +0200 @@ -0,0 +1 @@ +[] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/feat663-search.sh new/dub-1.42.0/test/feat663-search.sh --- old/dub-1.41.0/test/feat663-search.sh 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/test/feat663-search.sh 2026-08-05 17:14:37.000000000 +0200 @@ -1,13 +1,30 @@ #!/usr/bin/env bash -. $(dirname "${BASH_SOURCE[0]}")/common.sh +DIR=$(dirname "${BASH_SOURCE[0]}") + +. "$DIR"/common.sh + +# Test that search without arguments fails if ${DUB} search 2>/dev/null; then die $LINENO '`dub search` succeeded' fi -if ${DUB} search nonexistent123456789package 2>/dev/null; then + +# Start the local test registry +PORT=$(getRandomPort) + +${DUB} build --single "$DIR"/test_registry.d +"$DIR"/test_registry --folder="$DIR/feat663-search" --port=$PORT & +PID=$! +sleep 1 +trap 'kill $PID 2>/dev/null || true' exit + +# Test that search for nonexistent package returns no matches +if ${DUB} search nonexistent123456789package --skip-registry=all --registry=http://localhost:$PORT 2>/dev/null; then die $LINENO '`dub search nonexistent123456789package` succeeded' fi -if ! OUTPUT=$(${DUB} search '"dub-registry"' -v 2>&1); then + +# Test that search for "dub-registry" succeeds and returns results +if ! OUTPUT=$(${DUB} search '"dub-registry"' -v --skip-registry=all --registry=http://localhost:$PORT 2>&1); then die $LINENO '`dub search "dub-registry"` failed' "$OUTPUT" fi if ! grep -q '^\s\sdub-registry (.*)\s'<<<"$OUTPUT"; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/issue3082-workingdir-autocreate/dub.json new/dub-1.42.0/test/issue3082-workingdir-autocreate/dub.json --- old/dub-1.41.0/test/issue3082-workingdir-autocreate/dub.json 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.42.0/test/issue3082-workingdir-autocreate/dub.json 2026-08-05 17:14:37.000000000 +0200 @@ -0,0 +1,4 @@ +{ + "name": "issue3082-workingdir-autocreate", + "workingDirectory": "bin" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/issue3082-workingdir-autocreate/source/app.d new/dub-1.42.0/test/issue3082-workingdir-autocreate/source/app.d --- old/dub-1.41.0/test/issue3082-workingdir-autocreate/source/app.d 1970-01-01 01:00:00.000000000 +0100 +++ new/dub-1.42.0/test/issue3082-workingdir-autocreate/source/app.d 2026-08-05 17:14:37.000000000 +0200 @@ -0,0 +1,9 @@ +import std.stdio; +import std.path; +import std.file; + +void main() +{ + assert(baseName(getcwd()) == "bin"); + writeln("ok"); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc new/dub-1.42.0/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc --- old/dub-1.41.0/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/test/issue782-gtkd-pkg-config/fake-gtkd/pkgconfig/fake-gtkd.pc 2026-08-05 17:14:37.000000000 +0200 @@ -9,4 +9,6 @@ # The "-L-defaultlib=libphobos2.so" and "-defaultlib=libphobos2.so" should both end up on the compiler (at link stage) invocation as "-defaultlib=libphobos2.so" # For this test, it doesn't hurt that they appear twice on the cmd line... Libs: -L-L${libdir} -L-l:libfake-gtkd.so -L-l:libdl.so.2 -pthread -L-defaultlib=libphobos2.so -defaultlib=libphobos2.so -Cflags: -I${includedir} +# Cflags should be extracted and passed to the C preprocessor via -P flags +# -I goes to cImportPaths, -D goes to dflags with -P prefix +Cflags: -I${includedir} -DFAKE_GTKD_VERSION=100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dub-1.41.0/test/issue782-gtkd-pkg-config.sh new/dub-1.42.0/test/issue782-gtkd-pkg-config.sh --- old/dub-1.41.0/test/issue782-gtkd-pkg-config.sh 2025-12-12 15:40:38.000000000 +0100 +++ new/dub-1.42.0/test/issue782-gtkd-pkg-config.sh 2026-08-05 17:14:37.000000000 +0200 @@ -22,6 +22,25 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}${LD_LIBRARY_PATH:+:}$PWD/../fake-gtkd # pkg-config needs to find our .pc file which is in $PWD/../fake-gtkd/pkgconfig, so set PKG_CONFIG_PATH accordingly export PKG_CONFIG_PATH=$PWD/../fake-gtkd/pkgconfig + + # Verify that pkg-config --cflags is being extracted properly + # The .pc file includes -DFAKE_GTKD_VERSION=100 which should appear as -P-DFAKE_GTKD_VERSION=100 + VERBOSE_OUTPUT=$(${DUB} build --force --compiler=${DC} -v 2>&1) + if ! echo "$VERBOSE_OUTPUT" | grep -q "\-P-DFAKE_GTKD_VERSION=100"; then + echo "FAIL: pkg-config --cflags extraction not working: -P-DFAKE_GTKD_VERSION=100 not found in compiler flags" + echo "Verbose output:" + echo "$VERBOSE_OUTPUT" + exit 1 + fi + echo "PASS: pkg-config --cflags extraction working (-P-DFAKE_GTKD_VERSION=100 found)" + + # Also verify -P-I flag for cImportPaths is present + if ! echo "$VERBOSE_OUTPUT" | grep -q "\-P-I.*fake-gtkd"; then + echo "FAIL: pkg-config --cflags extraction not working: -P-I path not found in compiler flags" + exit 1 + fi + echo "PASS: pkg-config --cflags include path extraction working" + ${DUB} run --force --compiler=${DC} cd .. rm -rf fake-gtkd/.dub
