Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move changelog to a folder #4228

Merged
merged 1 commit into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions changelog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
This directory will get copied to dlang.org and cleared when master gets
merged into stable prior to a new release.

How to add a new changelog entry to the pending changelog?
==========================================================

Create a new file in the `changelog` folder. It should end with `.dd` and look
similar to a git commit message. The first line represents the title of the change.
After an empty line follows the long description:

```
My fancy title of the new feature

A long description of the new feature in `std.range`.
It can be followed by an example:
-------
import std.range : padLeft, padRight;
import std.algorithm.comparison : equal;

assert([1, 2, 3, 4, 5].padLeft(0, 7).equal([0, 0, 1, 2, 3, 4, 5]));

assert("Hello World!".padRight('!', 15).equal("Hello World!!!!"));
-------
and links to the documentation, e.g. $(REF drop, std, range) or
$(REF_ALTTEXT a custom name for the function, drop, std, range).

Links to the spec can look like this $(LINK2 $(ROOT_DIR)spec/module.html, this)
and of course you can link to other $(LINK2 https://forum.dlang.org/, external resources).
```

The title can't contain links (it's already one).
For more infos, see the [Ddoc spec](https://dlang.org/spec/ddoc.html).

Preview changes
---------------

If you have cloned the [tools](https://github.com/dlang/tools) and [dlang.org](https://github.com/dlang/dlang.org) repo),
you can preview the changelog with:

```
make -C ../dlang.org -f posix.mak pending_changelog
```
5 changes: 5 additions & 0 deletions changelog/ndslice-removal.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
`std.experimental.ndslice` has been deprecated.

The synchronization between Phobos and Mir turned out to be a lot of work
with litte gain. Users of `std.experimental.ndslice` are advised to
switch to the upstream $(LINK2 https://github.com/libmir/mir-algorithm, mir package).
13 changes: 13 additions & 0 deletions changelog/std-algorithm-searching-maxindex.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Added `std.algorithm.searching.maxIndex` to get the index of the maximum element of a range.

`std.algorithm.searching.maxIndex` gets the index of the maximum element of a range,
according to a specified predicate. The default predicate is "a > b".

-------
import std.algorithm.searching : maxIndex;
int[] a = [5, 4, 2, 1, 9, 10];
assert(a.minIndex == 5);

int[] a;
assert(a.minIndex == -1);
-------
13 changes: 13 additions & 0 deletions changelog/std-algorithm-searching-minindex.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Added `std.algorithm.searching.minIndex` to get the index of the minimum element of a range.

`std.algorithm.searching.minIndex` gets the index of the minimum element of a range,
according to a specified predicate. The default predicate is "a < b".

-------
import std.algorithm.searching : minIndex;
int[] a = [5, 4, 2, 1, 9, 10];
assert(a.minIndex == 3);

int[] a;
assert(a.minIndex == -1);
-------
16 changes: 16 additions & 0 deletions changelog/std-meta-statisissorted.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Added `std.meta.staticIsSorted` to check if an `AliasSeq` is sorted according to some template predicate.

`std.meta.staticIsSorted` checks whether an `AliasSeq` is
sorted according to some template predicate.
------
enum Comp(T1, T2) = T1.sizeof < T2.sizeof;

import std.meta : staticIsSorted;
static assert( staticIsSorted!(Comp, byte, uint, double));
static assert(!staticIsSorted!(Comp, bool, long, dchar));
------

Additionally, the compile-time performance of `std.meta.staticSort` has been
greatly improved. Nevertheless, due to compiler limitations it is still an
extraordinarily expensive operation to perform on longer sequences; strive to
minimize such use.
22 changes: 22 additions & 0 deletions changelog/std-traits-hasFunctionAttributes.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
`std.traits.hasFunctionAttributes` has been added

It exposes a user-friendly way to query for function attributes:
-------
import std.traits : hasFunctionAttributes;

// manually annotated function
real func(real x) pure nothrow @safe
{
return x;
}
static assert(hasFunctionAttributes!(func, "@safe", "pure"));
static assert(!hasFunctionAttributes!(func, "@trusted"));

// for templated function types are automatically inferred
bool myFunc(T)(T b)
{
return !b;
}
static assert(hasFunctionAttributes!(myFunc!bool, "@safe", "pure", "@nogc", "nothrow"));
static assert(!hasFunctionAttributes!(myFunc!bool, "shared"));
-------
12 changes: 12 additions & 0 deletions changelog/std-traits-promoted.dd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Added `std.traits.Promoted` to get the result of scalar type promotion in multi-term arithmetic expressions

`std.traits.Promoted` gets the type to which a scalar type will be promoted
in multi-term arithmetic expressions
-------
import std.traits : Promoted;
static assert(is(typeof(ubyte(3) * ubyte(5)) == Promoted!ubyte));
static assert(is(Promoted!ubyte == int));
-------

See the D specification on $(LINK2 $(ROOT_DIR)spec/type.html#integer-promotions,
scalar type promotions) for more information.