Merge remote-tracking branch 'upstream/master' into stable

This commit is contained in:
Iain Buclaw 2022-10-10 08:57:26 +00:00
commit fae3b69cb9
4 changed files with 24 additions and 24 deletions

View file

@ -139,7 +139,7 @@ auto getIssues(string revRange)
enum closedRE = ctRegex!(`(?:^fix(?:es)?(?:\s+(?:issues?|bugs?))?\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))`, "i"); enum closedRE = ctRegex!(`(?:^fix(?:es)?(?:\s+(?:issues?|bugs?))?\s+(#?\d+(?:[\s,\+&and]+#?\d+)*))`, "i");
auto issues = appender!(int[]); auto issues = appender!(int[]);
foreach (repo; ["dmd", "druntime", "phobos", "dlang.org", "tools", "installer"] foreach (repo; ["dmd", "phobos", "dlang.org", "tools", "installer"]
.map!(r => buildPath("..", r))) .map!(r => buildPath("..", r)))
{ {
auto cmd = ["git", "-C", repo, "fetch", "--tags", "https://github.com/dlang/" ~ repo.baseName, auto cmd = ["git", "-C", repo, "fetch", "--tags", "https://github.com/dlang/" ~ repo.baseName,
@ -276,14 +276,16 @@ Params:
Returns: An InputRange of `ChangelogEntry`s Returns: An InputRange of `ChangelogEntry`s
*/ */
auto readTextChanges(string changelogDir, string repoName) auto readTextChanges(string changelogDir, string repoName, string prefix)
{ {
import std.algorithm.iteration : filter, map; import std.algorithm.iteration : filter, map;
import std.file : dirEntries, SpanMode; import std.file : dirEntries, SpanMode;
import std.path : baseName;
import std.string : endsWith; import std.string : endsWith;
return dirEntries(changelogDir, SpanMode.shallow) return dirEntries(changelogDir, SpanMode.shallow)
.filter!(a => a.name().endsWith(".dd")) .filter!(a => a.name().endsWith(".dd"))
.filter!(a => prefix is null || a.name().baseName.startsWith(prefix))
.array.sort() .array.sort()
.map!(a => readChangelog(a, repoName)) .map!(a => readChangelog(a, repoName))
.filter!(a => a.title.length > 0); .filter!(a => a.title.length > 0);
@ -431,17 +433,17 @@ Please supply a bugzilla version
} }
// location of the changelog files // location of the changelog files
alias Repo = Tuple!(string, "name", string, "headline", string, "path"); alias Repo = Tuple!(string, "name", string, "headline", string, "path", string, "prefix");
auto repos = [Repo("dmd", "Compiler changes", null), auto repos = [Repo("dmd", "Compiler changes", "changelog", "dmd."),
Repo("druntime", "Runtime changes", null), Repo("dmd", "Runtime changes", "changelog", "druntime."),
Repo("phobos", "Library changes", null), Repo("phobos", "Library changes", "changelog", null),
Repo("dlang.org", "Language changes", null), Repo("dlang.org", "Language changes", "language-changelog", null),
Repo("installer", "Installer changes", null), Repo("installer", "Installer changes", "changelog", null),
Repo("tools", "Tools changes", null), Repo("tools", "Tools changes", "changelog", null),
Repo("dub", "Dub changes", null)]; Repo("dub", "Dub changes", "changelog", null)];
auto changedRepos = repos auto changedRepos = repos
.map!(repo => Repo(repo.name, repo.headline, buildPath(__FILE_FULL_PATH__.dirName, "..", repo.name, repo.name == "dlang.org" ? "language-changelog" : "changelog"))) .map!(repo => Repo(repo.name, repo.headline, buildPath(__FILE_FULL_PATH__.dirName, "..", repo.name, repo.path), repo.prefix))
.filter!(r => r.path.exists); .filter!(r => r.path.exists);
// ensure that all files either end on .dd or .md // ensure that all files either end on .dd or .md
@ -497,7 +499,7 @@ Please supply a bugzilla version
{ {
// search for raw change files // search for raw change files
auto changelogDirs = changedRepos auto changelogDirs = changedRepos
.map!(r => tuple!("headline", "changes")(r.headline, r.path.readTextChanges(r.name).array)) .map!(r => tuple!("headline", "changes")(r.headline, r.path.readTextChanges(r.name, r.prefix).array))
.filter!(r => !r.changes.empty); .filter!(r => !r.changes.empty);
// accumulate stats // accumulate stats

View file

@ -57,7 +57,7 @@ auto findAuthors(string revRange, FindConfig config)
{ {
Appender!(GitAuthor[]) authors; Appender!(GitAuthor[]) authors;
int commits; int commits;
auto repos = ["dmd", "druntime", "phobos", "dlang.org", "tools", "installer"]; auto repos = ["dmd", "phobos", "dlang.org", "tools", "installer"];
if (config.showAllContributors) if (config.showAllContributors)
repos ~= ["dub", "dub-registry", "dconf.org"]; repos ~= ["dub", "dub-registry", "dconf.org"];

View file

@ -3,7 +3,7 @@ BUILD = release
DMD = $(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd DMD = $(DMD_DIR)/generated/$(OS)/$(BUILD)/$(MODEL)/dmd
CC = gcc CC = gcc
INSTALL_DIR = ../install INSTALL_DIR = ../install
DRUNTIME_PATH = ../druntime DRUNTIME_PATH = ../dmd/druntime
PHOBOS_PATH = ../phobos PHOBOS_PATH = ../phobos
DUB=dub DUB=dub

View file

@ -6,10 +6,9 @@
# First run, create a working directory, e.g. /path/to/d/. Then run # First run, create a working directory, e.g. /path/to/d/. Then run
# this script from that directory (the location of the script itself # this script from that directory (the location of the script itself
# doesn't matter). It will create the following subdirectories: # doesn't matter). It will create the following subdirectories:
# /path/to/d/dmd, /path/to/d/druntime, /path/to/d/phobos, # /path/to/d/dmd, /path/to/d/phobos, /path/to/d/dlang.org,
# /path/to/d/dlang.org, /path/to/d/tools, and # /path/to/d/tools, and /path/to/d/installer. Then it will fetch all
# /path/to/d/installer. Then it will fetch all corresponding projects # corresponding projects from github and build them fresh.
# from github and build them fresh.
# #
# On an ongoing basis, to update your toolchain from github go again # On an ongoing basis, to update your toolchain from github go again
# to the same directory (in our example /path/to/d) and run the script # to the same directory (in our example /path/to/d) and run the script
@ -20,7 +19,7 @@
set -ueo pipefail set -ueo pipefail
declare -a projects declare -a projects
projects=(dmd druntime phobos dlang.org tools installer dub) projects=(dmd phobos dlang.org tools installer dub)
# Working directory # Working directory
wd=$(pwd) wd=$(pwd)
# github username # github username
@ -47,7 +46,7 @@ trap cleanup EXIT
function help() { function help() {
echo "./setup.sh echo "./setup.sh
Clones and builds dmd, druntime, phobos, dlang.org, tools, installer and dub. Clones and builds dmd, phobos, dlang.org, tools, installer and dub.
Additional usage Additional usage
@ -151,9 +150,8 @@ function installAnew() {
exit 1 exit 1
fi fi
if [ -n "${tag}" ] ; then if [ -n "${tag}" ] ; then
if [ "$project" == "dmd" ] || [ "$project" == "druntime" ] || \ if [ "$project" == "dmd" ] || [ "$project" == "phobos" ] || \
[ "$project" == "phobos" ] || [ "$project" == "dlang.org" ] || \ [ "$project" == "dlang.org" ] || [ "$project" == "tools" ] ; then
[ "$project" == "tools" ] ; then
git -C "$wd/$project" checkout "v$tag" git -C "$wd/$project" checkout "v$tag"
fi fi
fi fi
@ -194,7 +192,7 @@ function update() {
function makeWorld() { function makeWorld() {
local BOOTSTRAP="" local BOOTSTRAP=""
command -v dmd >/dev/null || BOOTSTRAP="AUTO_BOOTSTRAP=1" command -v dmd >/dev/null || BOOTSTRAP="AUTO_BOOTSTRAP=1"
for repo in dmd druntime phobos ; do for repo in dmd phobos ; do
# Pass `AUTO_BOOTSTRAP` because of https://issues.dlang.org/show_bug.cgi?id=20727 # Pass `AUTO_BOOTSTRAP` because of https://issues.dlang.org/show_bug.cgi?id=20727
"$makecmd" -C "$wd/$repo" -f posix.mak clean $BOOTSTRAP "$makecmd" -C "$wd/$repo" -f posix.mak clean $BOOTSTRAP
"$makecmd" -C "$wd/$repo" -f posix.mak "-j${parallel}" MODEL="$model" BUILD="$build" $BOOTSTRAP "$makecmd" -C "$wd/$repo" -f posix.mak "-j${parallel}" MODEL="$model" BUILD="$build" $BOOTSTRAP