diff --git a/source/dub/compilers/buildsettings.d b/source/dub/compilers/buildsettings.d index 2db92dd..ea86742 100644 --- a/source/dub/compilers/buildsettings.d +++ b/source/dub/compilers/buildsettings.d @@ -302,7 +302,7 @@ @ignore BitFlags!BuildOption values; this(BuildOption opt) { values = opt; } this(BitFlags!BuildOption v) { values = v; } - deprecated("Use BuildOption.* instead.") { + deprecated("Use BuildOption.* instead. Will be removed for version 1.0.0.") { enum none = BuildOption.none; enum debugMode = BuildOption.debugMode; enum releaseMode = BuildOption.releaseMode; diff --git a/source/dub/compilers/dmd.d b/source/dub/compilers/dmd.d index ab68890..4a2d868 100644 --- a/source/dub/compilers/dmd.d +++ b/source/dub/compilers/dmd.d @@ -24,7 +24,7 @@ import std.typecons; -deprecated alias DmdCompiler = DMDCompiler; +deprecated("Use DMDCompiler instead. Will be removed for version 1.0.0.") alias DmdCompiler = DMDCompiler; class DMDCompiler : Compiler { private static immutable s_options = [ diff --git a/source/dub/compilers/gdc.d b/source/dub/compilers/gdc.d index 8979238..10cc753 100644 --- a/source/dub/compilers/gdc.d +++ b/source/dub/compilers/gdc.d @@ -24,7 +24,7 @@ import std.typecons; -deprecated alias GdcCompiler = GDCCompiler; +deprecated("Use GDCCompiler instead. Will be removed for version 1.0.0.") alias GdcCompiler = GDCCompiler; class GDCCompiler : Compiler { private static immutable s_options = [ diff --git a/source/dub/compilers/ldc.d b/source/dub/compilers/ldc.d index b4d12d9..341ae9a 100644 --- a/source/dub/compilers/ldc.d +++ b/source/dub/compilers/ldc.d @@ -24,7 +24,7 @@ import std.typecons; -deprecated alias LdcCompiler = LDCCompiler; +deprecated("Use LDCCompiler instead. Will be removed for version 1.0.0.") alias LdcCompiler = LDCCompiler; class LDCCompiler : Compiler { private static immutable s_options = [ diff --git a/source/dub/dependency.d b/source/dub/dependency.d index f63ebcb..1aee61b 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -51,9 +51,9 @@ /// An invalid dependency (with no possible version matches). static @property invalid() { Dependency ret; ret.m_versA = Version.maxRelease; ret.m_versB = Version.minRelease; return ret; } - deprecated("Use .any instead") + deprecated("Use .any instead. Will be removed for version 1.0.0.") alias ANY = any; - deprecated("Use .invalid instead") + deprecated("Use .invalid instead. Will be removed for version 1.0.0.") alias INVALID = invalid; /** Constructs a new dependency specification from a string @@ -110,7 +110,7 @@ } /// Compatibility alias - deprecated("Use versionSpec instead.") + deprecated("Use versionSpec instead. Will be removed for version 1.0.0.") alias versionString = versionSpec; /** Sets/gets the matching version range as a specification string. @@ -640,17 +640,17 @@ static @property masterBranch() { return Version(masterString); } static @property unknown() { return Version(UNKNOWN_VERS); } - deprecated("Use minRelease instead") + deprecated("Use minRelease instead. Will be removed for version 1.0.0.") static @property RELEASE() { return Version("0.0.0"); } - deprecated("Use maxRelease instead") + deprecated("Use maxRelease instead. Will be removed for version 1.0.0.") static @property HEAD() { return Version(MAX_VERS); } - deprecated("Use masterBranch instead") + deprecated("Use masterBranch instead. Will be removed for version 1.0.0.") static @property MASTER() { return Version(MASTER_STRING); } - deprecated("Use unknown instead") + deprecated("Use unknown instead. Will be removed for version 1.0.0.") static @property UNKNOWN() { return Version(UNKNOWN_VERS); } - deprecated("Use masterBranch.toString() instead") + deprecated("Use masterBranch.toString() instead. Will be removed for version 1.0.0.") static @property MASTER_STRING() { return masterString; } - deprecated + deprecated("Will be removed for version 1.0.0.") static @property BRANCH_IDENT() { return branchPrefix; } /** Constructs a new `Version` from its string representation. @@ -663,7 +663,11 @@ m_version = vers; } - deprecated("Use the constructor instead.") + /** Constructs a new `Version` from its string representation. + + This method is equivalent to calling the constructor and is used as an + endpoint for the serialization framework. + */ static Version fromString(string vers) { return Version(vers); } bool opEquals(const Version oth) const { diff --git a/source/dub/description.d b/source/dub/description.d index 1577cb0..35e80ea 100644 --- a/source/dub/description.d +++ b/source/dub/description.d @@ -20,7 +20,7 @@ */ struct ProjectDescription { string rootPackage; /// Name of the root package being built - @ignore deprecated alias mainPackage = rootPackage; /// Compatibility alias + @ignore deprecated("Use rootPackage instead. Will be removed for version 1.0.0.") alias mainPackage = rootPackage; /// Compatibility alias string configuration; /// Name of the selected build configuration string buildType; /// Name of the selected build type string compiler; /// Canonical name of the compiler used (e.g. "dmd", "gdc" or "ldc") @@ -120,7 +120,7 @@ */ struct SourceFileDescription { @byName SourceFileRole role; /// Main role this file plays in the build process - @ignore deprecated alias type = role; /// Compatibility alias + @ignore deprecated("Use role instead. Will be removed for version 1.0.0.") alias type = role; /// Compatibility alias string path; /// Full path to the file } diff --git a/source/dub/dub.d b/source/dub/dub.d index f4a979d..d9eface 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -144,7 +144,7 @@ updatePackageSearchPath(); } /// ditto - deprecated + deprecated("Will be removed for version 1.0.0.") this(PackageSupplier[] additional_package_suppliers = null, string root_path = ".", SkipPackageSuppliers skip_registry = SkipPackageSuppliers.none) { @@ -221,10 +221,10 @@ return .defaultCompiler(); } - deprecated void shutdown() {} - deprecated void cleanCaches() {} + deprecated("Will be removed for version 1.0.0.") void shutdown() {} + deprecated("Will be removed for version 1.0.0.") void cleanCaches() {} - deprecated("Use loadPackage instead.") + deprecated("Use loadPackage instead. Will be removed for version 1.0.0.") alias loadPackageFromCwd = loadPackage; /** Loads the package that resides within the configured `rootPath`. @@ -500,7 +500,7 @@ } /// Outputs a JSON description of the project, including its dependencies. - deprecated void describeProject(BuildPlatform platform, string config) + deprecated("Will be removed for version 1.0.0.") void describeProject(BuildPlatform platform, string config) { import std.stdio; auto desc = m_project.describe(platform, config); @@ -509,7 +509,7 @@ /** Prints a list of all import paths necessary for building the root package. */ - deprecated void listImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) + deprecated("Will be removed for version 1.0.0.") void listImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) { import std.stdio; @@ -520,7 +520,7 @@ /** Prints a list of all string import paths necessary for building the root package. */ - deprecated void listStringImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) + deprecated("Will be removed for version 1.0.0.") void listStringImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) { import std.stdio; @@ -556,7 +556,7 @@ write(data.joiner(delimiter)); if (delimiter != "\0\0") writeln(); } - deprecated("Use the overload taking GeneratorSettings instead.") + deprecated("Use the overload taking GeneratorSettings instead. Will be removed for version 1.0.0.") void listProjectData(BuildPlatform platform, string config, string buildType, string[] requestedData, Compiler formattingCompiler, bool null_delim) { @@ -585,7 +585,7 @@ /// Returns all cached packages as a "packageId" = "version" associative array - deprecated string[string] cachedPackages() const { return m_project.cachedPackagesIDs; } + deprecated("Will be removed for version 1.0.0.") string[string] cachedPackages() const { return m_project.cachedPackagesIDs; } /// Fetches the package matching the dependency and places it in the specified location. Package fetch(string packageId, const Dependency dep, PlacementLocation location, FetchOptions options, string reason = "") @@ -1025,9 +1025,9 @@ private Path makeAbsolute(string p) const { return makeAbsolute(Path(p)); } } -deprecated alias determineModuleName = dub.internal.utils.determineModuleName; -deprecated alias getModuleNameFromContent = dub.internal.utils.getModuleNameFromContent; -deprecated alias getModuleNameFromFile = dub.internal.utils.getModuleNameFromFile; +deprecated("Will be removed for version 1.0.0.") alias determineModuleName = dub.internal.utils.determineModuleName; +deprecated("Will be removed for version 1.0.0.") alias getModuleNameFromContent = dub.internal.utils.getModuleNameFromContent; +deprecated("Will be removed for version 1.0.0.") alias getModuleNameFromFile = dub.internal.utils.getModuleNameFromFile; /// Option flags for `Dub.fetch` @@ -1059,7 +1059,7 @@ all /// Uses only manually specified package suppliers. } -deprecated("Use SkipPackageSuppliers instead.") +deprecated("Use SkipPackageSuppliers instead. Will be removed for version 1.0.0.") alias SkipRegistry = SkipPackageSuppliers; private class DependencyVersionResolver : DependencyResolver!(Dependency, Dependency) { diff --git a/source/dub/package_.d b/source/dub/package_.d index a9a2308..cf8b7e6 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -203,18 +203,18 @@ @property Path recipePath() const { return m_infoFile; } - deprecated("Use .version_.toString() instead.") + deprecated("Use .version_.toString() instead. Will be removed for version 1.0.0.") @property string vers() const { return m_parentPackage ? m_parentPackage.vers : m_info.version_; } - deprecated("Use .version instead") + deprecated("Use .version instead. Will be removed for version 1.0.0.") @property Version ver() const { return Version(this.vers); } - deprecated("Use .version instead") + deprecated("Use .version instead. Will be removed for version 1.0.0.") @property void ver(Version ver) { assert(m_parentPackage is null); m_info.version_ = ver.toString(); } - deprecated("Use .recipe instead") + deprecated("Use .recipe instead. Will be removed for version 1.0.0.") @property ref inout(PackageRecipe) info() inout { return m_info; } - deprecated("Use .recipePath instead") + deprecated("Use .recipePath instead. Will be removed for version 1.0.0.") @property Path packageInfoFilename() const { return m_infoFile; } /** Returns a list of all possible dependencies of the package. @@ -616,7 +616,7 @@ return ret; } // ditto - deprecated void describe(ref Json dst, BuildPlatform platform, string config) + deprecated("Will be removed for version 1.0.0.") void describe(ref Json dst, BuildPlatform platform, string config) { auto res = describe(platform, config); foreach (string key, value; res.serializeToJson()) diff --git a/source/dub/packagesupplier.d b/source/dub/packagesupplier.d index 6e5bf36..a1cfe71 100644 --- a/source/dub/packagesupplier.d +++ b/source/dub/packagesupplier.d @@ -60,7 +60,7 @@ */ void fetchPackage(Path path, string package_id, Dependency dep, bool pre_release); - deprecated("Use fetchPackage instead.") + deprecated("Use fetchPackage instead. Will be removed for version 1.0.0.") alias retrievePackage = fetchPackage; /** Retrieves only the recipe of a particular package. @@ -73,7 +73,7 @@ */ Json fetchPackageRecipe(string package_id, Dependency dep, bool pre_release); - deprecated("Use fetchPackageRecipe instead.") + deprecated("Use fetchPackageRecipe instead. Will be removed for version 1.0.0.") alias getPackageDescription = fetchPackageRecipe; /** Searches for packages matching the given search query term. diff --git a/source/dub/project.d b/source/dub/project.d index 8dae9f3..e3f216d 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -98,7 +98,7 @@ } /// Gathers information - deprecated @property string info() + deprecated("Will be removed for version 1.0.0.") @property string info() const { if(!m_rootPackage) return "-Unrecognized application in '"~m_rootPackage.path.toNativeString()~"' (probably no dub.json in this directory)"; @@ -111,7 +111,7 @@ } /// Gets all retrieved packages as a "packageId" = "version" associative array - deprecated @property string[string] cachedPackagesIDs() const { + deprecated("Will be removed for version 1.0.0.") @property string[string] cachedPackagesIDs() const { string[string] pkgs; foreach(p; m_dependencies) pkgs[p.name] = p.version_.toString(); @@ -618,7 +618,7 @@ } /// Determines if the given dependency is already indirectly referenced by other dependencies of pack. - deprecated bool isRedundantDependency(in Package pack, in Package dependency) + deprecated("Will be removed for version 1.0.0.") bool isRedundantDependency(in Package pack, in Package dependency) const { foreach (dep; pack.recipe.dependencies.byKey) { auto dp = getDependency(dep, true); @@ -669,14 +669,14 @@ return ret; } /// ditto - deprecated void describe(ref Json dst, BuildPlatform platform, string config) + deprecated("Will be removed for version 1.0.0.") void describe(ref Json dst, BuildPlatform platform, string config) { auto desc = describe(platform, config); foreach (string key, value; desc.serializeToJson()) dst[key] = value; } /// ditto - deprecated("Use the overload taking a GeneratorSettings instance.") + deprecated("Use the overload taking a GeneratorSettings instance. Will be removed for version 1.0.0.") ProjectDescription describe(BuildPlatform platform, string config, string build_type = null) { GeneratorSettings settings; @@ -997,7 +997,7 @@ } } - deprecated("Use the overload taking a GeneratorSettings instance instead.") + deprecated("Use the overload taking a GeneratorSettings instance instead. Will be removed for version 1.0.0.") string[] listBuildSettings(BuildPlatform platform, string config, string buildType, string[] requestedData, Compiler formattingCompiler, bool nullDelim) { @@ -1013,14 +1013,14 @@ } /// Outputs the import paths for the project, including its dependencies. - deprecated string[] listImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) + deprecated("Will be removed for version 1.0.0.") string[] listImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) { auto projectDescription = describe(platform, config, buildType); return listBuildSetting!"importPaths"(platform, config, projectDescription, null, nullDelim); } /// Outputs the string import paths for the project, including its dependencies. - deprecated string[] listStringImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) + deprecated("Will be removed for version 1.0.0.") string[] listStringImportPaths(BuildPlatform platform, string config, string buildType, bool nullDelim) { auto projectDescription = describe(platform, config, buildType); return listBuildSetting!"stringImportPaths"(platform, config, projectDescription, null, nullDelim); @@ -1127,7 +1127,7 @@ /// Actions to be performed by the dub -deprecated struct Action { +deprecated("Will be removed for version 1.0.0.") struct Action { enum Type { fetch, remove, @@ -1300,7 +1300,7 @@ throw new Exception("Invalid variable: "~name); } -deprecated string stripDlangSpecialChars(string s) +deprecated("Will be removed for version 1.0.0.") string stripDlangSpecialChars(string s) { return dub.internal.utils.stripDlangSpecialChars(s); } diff --git a/source/dub/recipe/packagerecipe.d b/source/dub/recipe/packagerecipe.d index 91096f7..10c9734 100644 --- a/source/dub/recipe/packagerecipe.d +++ b/source/dub/recipe/packagerecipe.d @@ -87,7 +87,7 @@ SubPackage[] subPackages; - deprecated("Use Package.dependencies or the dependencies of the individual BuildSettingsTemplates instead.") + deprecated("Use Package.dependencies or the dependencies of the individual BuildSettingsTemplates instead. Will be removed for version 1.0.0.") @property const(Dependency)[string] dependencies() const { Dependency[string] ret;