diff --git a/source/dub/commandline.d b/source/dub/commandline.d index da81b20..b190eea 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -80,7 +80,7 @@ if(local) defaultPlacementLocation = PlacementLocation.local; else if(system) - defaultPlacementLocation = PlacementLocation.systemWide; + defaultPlacementLocation = PlacementLocation.system; if( vverbose ) loglevel = LogLevel.debug_; else if( verbose ) loglevel = LogLevel.diagnostic; diff --git a/source/dub/dub.d b/source/dub/dub.d index 518ab92..436f604 100644 --- a/source/dub/dub.d +++ b/source/dub/dub.d @@ -90,7 +90,7 @@ m_userDubPath = Path(getcwd()) ~ m_userDubPath; m_tempPath = Path("/tmp"); } - + m_userConfig = jsonFromFile(m_userDubPath ~ "settings.json", true); m_systemConfig = jsonFromFile(m_systemDubPath ~ "settings.json", true); @@ -233,7 +233,7 @@ generator.generate(settings); } - /// Executes tests on the current project. Throws an exception, if + /// Executes tests on the current project. Throws an exception, if /// unittests failed. void testProject(GeneratorSettings settings, string config, Path custom_main_file) { @@ -260,7 +260,7 @@ logInfo(`Configuration '%s' has target type "none". Skipping test.`, config); return; } - + if (lbuildsettings.targetType == TargetType.executable) { if (config == "unittest") logInfo("Running custom 'unittest' configuration.", config); else logInfo(`Configuration '%s' does not output a library. Falling back to "dub -b unittest -c %s".`, config, config); @@ -357,7 +357,7 @@ { logInfo("Cleaning package at %s...", path.toNativeString()); enforce(Package.isPackageAt(path), "No package found.", path.toNativeString()); - + // TODO: clear target files and copy files if (existsFile(path ~ ".dub/build")) rmdirRecurse((path ~ ".dub/build").toNativeString()); @@ -389,8 +389,8 @@ Path placement; final switch (location) { case PlacementLocation.local: placement = m_rootPath; break; - case PlacementLocation.userWide: placement = m_userDubPath ~ "packages/"; break; - case PlacementLocation.systemWide: placement = m_systemDubPath ~ "packages/"; break; + case PlacementLocation.user: placement = m_userDubPath ~ "packages/"; break; + case PlacementLocation.system: placement = m_systemDubPath ~ "packages/"; break; } // always upgrade branch based versions - TODO: actually check if there is a new commit available @@ -444,10 +444,10 @@ /// @see remove(string, string, RemoveLocation) enum RemoveVersionWildcard = "*"; - /// This will remove a given package with a specified version from the + /// This will remove a given package with a specified version from the /// location. - /// It will remove at most one package, unless @param version_ is - /// specified as wildcard "*". + /// It will remove at most one package, unless @param version_ is + /// specified as wildcard "*". /// @param package_id Package to be removed /// @param version_ Identifying a version or a wild card. An empty string /// may be passed into. In this case the package will be removed from the @@ -482,7 +482,7 @@ logError("Cannot remove package '" ~ package_id ~ "', there are multiple possibilities at location\n" ~ "'" ~ to!string(location_) ~ "'."); logError("Available versions:"); - foreach(pack; packages) + foreach(pack; packages) logError(" %s", pack.vers); throw new Exception("Please specify a individual version using --version=... or use the" ~ " wildcard --version=" ~ RemoveVersionWildcard ~ " to remove all versions."); diff --git a/source/dub/project.d b/source/dub/project.d index 6568556..6dd0a03 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -626,12 +626,12 @@ static Action conflict(string pkg, in Dependency dep, Dependency[string] context) { - return Action(Type.conflict, pkg, PlacementLocation.userWide, dep, context); + return Action(Type.conflict, pkg, PlacementLocation.user, dep, context); } static Action failure(string pkg, in Dependency dep, Dependency[string] context) { - return Action(Type.failure, pkg, PlacementLocation.userWide, dep, context); + return Action(Type.failure, pkg, PlacementLocation.user, dep, context); } private this(Type id, string pkg, PlacementLocation location, in Dependency d, Dependency[string] issue, Version existing_version = Version.UNKNOWN) @@ -666,14 +666,14 @@ local, /// Packages with 'userWide' will be placed in a folder accessible by /// all of the applications from the current user. - userWide, + user, /// Packages retrieved with 'systemWide' will be placed in a shared folder, /// which can be accessed by all users of the system. - systemWide + system } /// The default placement location of fetched packages. Can be changed by --local or --system. -auto defaultPlacementLocation = PlacementLocation.userWide; +auto defaultPlacementLocation = PlacementLocation.user; void processVars(ref BuildSettings dst, in Project project, in Package pack, BuildSettings settings, bool include_target_settings = false)