Skip to content

Commit 9900dfb

Browse files
danmoseleyYoussef1313jkotas
authored
Organize some markdowns and fix links (dotnet#1159)
* Move files into hierarchy * fix more links * Fix botr and features links * Remove bad apostrophe * spelling * Apply suggestions from code review Co-Authored-By: Youssef Victor <[email protected]> * Update docs/coding-guidelines/package-projects.md Co-Authored-By: Jan Kotas <[email protected]> Co-authored-by: Youssef Victor <[email protected]> Co-authored-by: Jan Kotas <[email protected]>
1 parent a2faf10 commit 9900dfb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+102
-95
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,6 @@ See [IdnMapping.cs](./src/libraries/System.Private.CoreLib/src/System/Globalizat
157157

158158
### Porting Files from Other Projects
159159

160-
There are many good algorithms implemented in other languages that would benefit the .NET Core project. The rules for porting a Java file to C# , for example, are the same as would be used for copying the same file, as described above.
160+
There are many good algorithms implemented in other languages that would benefit the .NET Core project. The rules for porting a Java file to C#, for example, are the same as would be used for copying the same file, as described above.
161161

162162
[Clean-room](https://en.wikipedia.org/wiki/Clean_room_design) implementations of existing algorithms that are not permissively licensed will generally not be accepted. If you want to create or nominate such an implementation, please create an issue to discuss the idea.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Official Starting Page: https://dotnet.microsoft.com/
2222

2323
We welcome contributions! Many people all over the world have helped make this project better.
2424

25-
For further information see [Contributing](CONTRIBUTING.md).
25+
* [Contributing](CONTRIBUTING.md) explains what kinds of changes we welcome
26+
- [Workflow Instructions](docs/workflow/README.md) explains how to build and test
2627

2728
## Reporting security issues and security bugs
2829

docs/README.md

-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ Getting Started
1414
- [Installing the .NET SDK](https://dotnet.microsoft.com/download)
1515
- [Official .NET Docs](https://docs.microsoft.com/dotnet/core/)
1616

17-
Software requirements
18-
===============
19-
20-
- [Windows Requirements](workflow/windows-requirements.md)
21-
- [Linux Requirements](workflow/linux-requirements.md)
22-
- [MacOS Requirements](workflow/macos-requirements.md)
23-
2417
Workflow (Building, testing, etc.)
2518
===============
2619

docs/coding-guidelines/EventLogging.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Event Logging is a mechanism by which CoreClr can provide a variety of informati
66

77
# Adding Events to the Runtime
88

9-
- Edit the [Event manifest](../../src/vm/ClrEtwAll.man) to add a new event. For guidelines on adding new events, take a look at the existing events in the manifest and this guide for [ETW Manifests](https://msdn.microsoft.com/en-us/library/dd996930%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396).
9+
- Edit the [Event manifest](../../src/coreclr/src/vm/ClrEtwAll.man) to add a new event. For guidelines on adding new events, take a look at the existing events in the manifest and this guide for [ETW Manifests](https://msdn.microsoft.com/en-us/library/dd996930%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396).
1010
- The build system should automatically generate the required artifacts for the added events.
11-
- Add entries in the [exclusion list](../../src/vm/ClrEtwAllMeta) if necessary
11+
- Add entries in the [exclusion list](../../src/coreclr/src/vm/ClrEtwAllMeta.lst) if necessary
1212
- The Event Logging Mechanism provides the following two functions, which can be used within the VM:
1313
- **FireEtw**EventName, this is used to trigger the event
1414
- **EventEnabled**EventName, this is used to see if any consumer has subscribed to this event
1515

1616

1717
# Adding New Logging System
1818

19-
Though the the Event logging system was designed for ETW, the build system provides a mechanism, basically an [adapter script- genXplatEventing.py](../../src/scripts/genXplatEventing.py) so that other Logging System can be added and used by CoreClr. An Example of such an extension for [LTTng logging system](https://lttng.org/) can be found in [genXplatLttng.py](../../src/scripts/genXplatLttng.py )
19+
Though the the Event logging system was designed for ETW, the build system provides a mechanism, basically an [adapter script- genEventing.py](../../src/coreclr/src/scripts/genEventing.py) so that other Logging System can be added and used by CoreClr. An Example of such an extension for [LTTng logging system](https://lttng.org/) can be found in [genLttngProvider.py](../../src/coreclr/src/scripts/genLttngProvider.py )

docs/coding-guidelines/adding-api-guidelines.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ Recommended reading to better understand this document:
44
| [Package-Projects](package-projects.md)
55

66
# Add APIs
7-
- [Determining versions and targets](#determining-versions-and-targets)
8-
- [Making the changes in repo](#making-the-changes-in-repo)
9-
- [FAQ](#faq)
107

11-
## Determining versions and targets
12-
13-
1. [Determine what library](#determine-what-library) the API goes into.
14-
2. [Determine the target framework](#determine-target-framework) for the library that will contain the API.
15-
3. [Determine the version](#determine-library-version) for the library that will contain the API.
8+
- [Add APIs](#add-apis)
9+
- [Determine what library](#determine-what-library)
10+
- [Determine target framework](#determine-target-framework)
11+
- [Determine library version](#determine-library-version)
12+
- [Making the changes in repo](#making-the-changes-in-repo)
13+
- [FAQ](#faq)
1614

1715
### Determine what library
16+
1817
- Propose a library for exposing it as part of the [API review process](http://aka.ms/apireview).
1918
- Keep in mind the API might be exposed in a reference assembly that
2019
doesn't match the identity of the implementation. There are many reasons for this but
@@ -23,9 +22,10 @@ different platforms while sharing a common API surface and allowing us to refact
2322
the implementation without compat concerns in future releases.
2423

2524
### Determine target framework
25+
2626
`netstandard` or `netcoreapp` is the target framework version currently under development.
2727

28-
- If the library is [part of netstandard](#isnetstandard)
28+
- If the library is [part of netstandard](#faq)
2929
- Your target framework should be `netstandard`
3030
- If it is a new API only available on .NET Core then it will be added to `netcoreapp`
3131
- If the library is not part of netstandard
@@ -83,4 +83,4 @@ project references across the projects. You also need to be sure to leave type-f
8383
where you removed types in order to maintain back-compat.
8484

8585

86-
[net-standard table]: https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support
86+
[net-standard table]: https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support

docs/coding-guidelines/package-projects.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,10 @@ Sample `System.IO.FileSystem.pkgproj`
214214
```
215215

216216
## Asset selection
217+
217218
The makeup of a package folder is primarily a grouping of project references to the projects that compose that package. Settings within each referenced project determines where that asset will be placed in the package. For example, reference assembly projects will be placed under the `ref/{targetMoniker}` folder in the package and implementations will be under either `lib/{targetMoniker}` or `runtimes/{rid}/lib/{targetMoniker}`. Whenever NuGet evaluates a package in the context of a referencing project it will choose the best compile time asset (preferring `ref`, then falling back to `lib`) and runtime asset (preferring `runtimes/{rid}/lib` and falling back to `lib`) for every package that is referenced. For more information see http://docs.nuget.org/.
218219

219-
Asset projects (`.csproj`, `.vbproj`, or `.depproj`) can control their `{targetMoniker}` using the `PackageTargetFramework` property in the project file. Similarly `{rid}` is controlled using the `PackageTargetRuntime` property. In the corefx repo we automatically select default values for these properties based on the [Build pivots](#build-pivots). These can be overridden in the project reference using metadata of the same name, but this is rarely needed.
220+
Asset projects (`.csproj`, `.vbproj`, or `.depproj`) can control their `{targetMoniker}` using the `PackageTargetFramework` property in the project file. Similarly `{rid}` is controlled using the `PackageTargetRuntime` property. For the libraries we automatically select default values for these properties based on the build pivots. These can be overridden in the project reference using metadata of the same name, but this is rarely needed.
220221

221222
The primary thing that the library author needs to do in order to ensure the correct asset selection is:
222223

docs/coding-guidelines/performance-guidelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Different applications have different needs when it comes to performance. For l
55

66
Much has been written about writing high-performance code in C#. This page provides links to some of that material and will expand over time as additional resources are found and identified as being relevant and useful.
77

8-
You can read [CoreCLR Performance Requirements](../../coreclr/project-docs/performance-guidelines.md) to learn more.
8+
You can read [CoreCLR Performance Requirements](../project/performance-guidelines.md) to learn more.
99

1010
# Memory Management
1111

docs/coding-guidelines/project-guidelines.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ Each source file should use the following guidelines
244244
- `.WinRT.cs` - implementation based on [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime)
245245

246246
## Define naming convention
247-
As mentioned in [Conventions for forked code](conventions-for-forked-code) `#ifdef`ing the code is the last resort as it makes code harder to maintain overtime. If we do need to use `#ifdef`'s we should use the following conventions:
247+
248+
As mentioned in [Conventions for forked code](#conventions-for-forked-code) `#ifdef`ing the code is the last resort as it makes code harder to maintain overtime. If we do need to use `#ifdef`'s we should use the following conventions:
248249
- Defines based on conventions should be one of `$(OSGroup)`, `$(TargetGroup)`, `$(ConfigurationGroup)`, or `$(Platform)`, matching exactly by case to ensure consistency.
249250
- Examples: `<DefineConstants>$(DefineConstants);net46</DefineConstants>`
250251
- Defines based on convention should match the pattern `FEATURE_<feature name>`. These can unique to a given library project or potentially shared (via name) across multiple projects.
+10-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
This document provides the steps you need to take to update the reference assembly when adding new **public** APIs to an implementation assembly (post [API Review](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/adding-api-guidelines.md)).
1+
This document provides the steps you need to take to update the reference assembly when adding new **public** APIs to an implementation assembly (post [API Review](adding-api-guidelines.md)).
22

3-
## For most assemblies within corefx
4-
1) Implement the API in the source assembly and [build it](../project-docs/developer-guide.md#building-individual-libraries).
5-
2) Run the following command (from the src directory) `msbuild /t:GenerateReferenceSource` to update the reference assembly**.
6-
3) Navigate to the ref directory and build the reference assembly.
7-
4) Add, build, and run tests.
3+
## For most assemblies within libraries
4+
5+
1. Implement the API in the source assembly and [build it](../workflow/building/libraries/README.md#building-individual-libraries).
6+
2. Run the following command (from the src directory) `msbuild /t:GenerateReferenceSource` to update the reference assembly**.
7+
3. Navigate to the ref directory and build the reference assembly.
8+
4. Add, build, and run tests.
89

910
** **Note:** If you already added the new API to the reference source, re-generating it (after building the source assembly) will update it to be fully qualified and placed in the correct order. This can be done by running the `GenerateReferenceSource` command from the ref directory.
1011

1112
## For System.Runtime
13+
1214
These steps can also be applied to some unique assemblies which depend on changes in System.Private.Corelib coming from [coreclr](https://github.com/dotnet/coreclr) (partial facades like [System.Memory](https://github.com/dotnet/corefx/blob/83711167ee74d2e87cf2d5ed3508c94044bb7edc/src/System.Memory/src/System.Memory.csproj#L6), for example).
1315
1) Build coreclr release.
14-
2) Build corefx release with coreclr bits (see [Testing with private CoreCLR bits](../project-docs/developer-guide.md#testing-with-private-coreclr-bits) for more details).
16+
2) Build corefx release with coreclr bits (see (// TODO //)) for more details).
1517
3) Run `msbuild /t:GenerateReferenceSource /p:ConfigurationGroup=Release` from the System.Runtime/ref directory.
16-
4) Filter out all unrelated changes and extract the changes you care about (ignore certain attributes being removed). Generally, this step is not required for other reference assemblies.
18+
4) Filter out all unrelated changes and extract the changes you care about (ignore certain attributes being removed). Generally, this step is not required for other reference assemblies.

docs/design/coreclr/botr/intro-to-clr.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ Phew! The runtime does a lot! It has taken many pages just to describe _some_ o
254254
- [CoreCLR Repo Documentation](README.md)
255255

256256
[clr]: http://msdn.microsoft.com/library/8bs2ecf4.aspx
257-
[ecma-spec]: ../project-docs/dotnet-standards.md
257+
[ecma-spec]: ../../../project/dotnet-standards.md
258258
[cil-spec]: http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20III.pdf
259259
[fx-design-guidelines]: http://msdn.microsoft.com/en-us/library/ms229042.aspx

docs/design/coreclr/botr/method-descriptor.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ P/Invoke methods. These are methods marked with DllImport attribute.
5050

5151
**EEImpl**
5252

53-
Delegate methods whose implementation is provided by the runtime (Invoke, BeginInvoke, EndInvoke). See [ECMA 335 Partition II - Delegates](../project-docs/dotnet-standards.md).
53+
Delegate methods whose implementation is provided by the runtime (Invoke, BeginInvoke, EndInvoke). See [ECMA 335 Partition II - Delegates](../../../project/dotnet-standards.md).
5454

5555
**Array**
5656

57-
Array methods whose implementation is provided by the runtime (Get, Set, Address). See [ECMA Partition II – Arrays](../project-docs/dotnet-standards.md).
57+
Array methods whose implementation is provided by the runtime (Get, Set, Address). See [ECMA Partition II – Arrays](../../../project/dotnet-standards.md).
5858

5959
**ComInterop**
6060

docs/design/coreclr/botr/mscorlib.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ FCalls require a lot of glue, too much to describe here. Look at [fcall.h][fcall
172172

173173
### GC Holes, FCall, and QCall
174174

175-
A much more complete discussion on GC holes can be found in the [CLR Code Guide](../coding-guidelines/clr-code-guide.md). Look for ["Is your code GC-safe?"](../coding-guidelines/clr-code-guide.md#is-your-code-gc-safe). This tailored discussion motivates some of the reasons why FCall and QCall have some of their strange conventions.
175+
A much more complete discussion on GC holes can be found in the [CLR Code Guide](../../../coding-guidelines/clr-code-guide.md). Look for ["Is your code GC-safe?"](../../../coding-guidelines/clr-code-guide.md#2.1). This tailored discussion motivates some of the reasons why FCall and QCall have some of their strange conventions.
176176

177177
Object references passed as parameters to FCall methods are not GC-protected, meaning that if a GC occurs, those references will point to the old location in memory of an object, not the new location. For this reason, FCalls usually follow the discipline of accepting something like "StringObject*" as their parameter type, then explicitly converting that to a STRINGREF before doing operations that may trigger a GC. You must GC protect object references before triggering a GC, if you expect to be able to use that object reference later.
178178

docs/design/coreclr/botr/porting-ryujit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ There are several steps to follow to port the JIT (some of which can be be done
5353
* `FEATURE_SIMD`
5454
* Build the new JIT as an altjit. In this mode, a "base" JIT is invoked to compile all functions except
5555
the one(s) specified by the `COMPlus_AltJit` variable. For example, setting `COMPlus_AltJit=Add` and running
56-
a test will use the "base" JIT (say, the Windows x64 targetting JIT) to compile all functions *except*
56+
a test will use the "base" JIT (say, the Windows x64 targeting JIT) to compile all functions *except*
5757
`Add`, which will be first compiled by the new altjit, and if it fails, fall back to the "base" JIT. In this
5858
way, only very limited JIT functionality need to work, as the "base" JIT takes care of most functions.
5959
* Implement the basic instruction encodings. Test them using a method like `CodeGen::genArm64EmitterUnitTests()`.

docs/design/coreclr/botr/threading.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Every managed thread has an associated Thread object, defined in [threads.h][thr
2727

2828
All Thread objects are stored in the ThreadStore (also defined in [threads.h][threads.h]), which is a simple list of all known Thread objects. To enumerate all managed threads, one must first acquire the ThreadStoreLock, then use ThreadStore::GetAllThreadList to enumerate all Thread objects. This list may include managed threads which are not currently assigned to native threads (for example, they may not yet be started, or the native thread may already have exited).
2929

30-
[threads.h]: ../../src/vm/threads.h
30+
[threads.h]: ../../../../src/coreclr/src/vm/threads.h
3131

3232
Each managed thread that is currently assigned to a native thread is reachable via a native thread-local storage (TLS) slot on that native thread. This allows code that is executing on that native thread to get the corresponding Thread object, via GetThread().
3333

@@ -135,8 +135,8 @@ Sync blocks are stored in the Sync Block Table, and are addressed by sync block
135135

136136
The details of object headers and sync blocks are defined in [syncblk.h][syncblk.h]/[.cpp][syncblk.cpp].
137137

138-
[syncblk.h]: ../../src/vm/syncblk.h
139-
[syncblk.cpp]: ../../src/vm/syncblk.cpp
138+
[syncblk.h]: ../../../../src/coreclr/src/vm/syncblk.h
139+
[syncblk.cpp]: ../../../../src/coreclr/src/vm/syncblk.cpp
140140

141141
If there is room on the object header, Monitor stores the managed thread ID of the thread that currently holds the lock on the object (or zero (0) if no thread holds the lock). Acquiring the lock in this case is a simple matter of spin-waiting until the object header's thread ID is zero, and then atomically setting it to the current thread's managed thread ID.
142142

@@ -168,12 +168,12 @@ Thus entering cooperative mode in native code is discouraged. In cases where coo
168168

169169
Similarly, GCX\_PREEMP potentially _releases_ a lock that had been held by the thread. Great care must be taken to ensure that all GC references are properly protected before entering preemptive mode.
170170

171-
The [Rules of the Code](../coding-guidelines/clr-code-guide.md) document describes the disciplines needed to ensure safety around GC mode switches.
171+
The [Rules of the Code](../../../coding-guidelines/clr-code-guide.md) document describes the disciplines needed to ensure safety around GC mode switches.
172172

173173
Crst
174174
----
175175

176-
Just as Monitor is the preferred locking mechanism for managed code, Crst is the preferred mechanism for VM code. Like Monitor, Crst is a hybrid lock that is aware of hosts and GC modes. Crst also implements deadlock avoidance via "lock leveling," described in the [Crst Leveling chapter of the BotR](../coding-guidelines/clr-code-guide.md#264-entering-and-leaving-crsts).
176+
Just as Monitor is the preferred locking mechanism for managed code, Crst is the preferred mechanism for VM code. Like Monitor, Crst is a hybrid lock that is aware of hosts and GC modes. Crst also implements deadlock avoidance via "lock leveling," described in the [Crst Leveling chapter of the BotR](../../../coding-guidelines/clr-code-guide.md#2.6.4).
177177

178178
It is generally illegal to acquire a Crst while in cooperative mode, though exceptions are made where absolutely necessary.
179179

docs/design/coreclr/botr/type-system.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Major entry points are BuildMethodTable, LoadTypeHandleThrowing, CanCastTo\*, Ge
227227
Related Reading
228228
===============
229229

230-
- [ECMA CLI Specification](../project-docs/dotnet-standards.md)
230+
- [ECMA CLI Specification](../../../project/dotnet-standards.md)
231231
- [Type Loader](type-loader.md) Book of the Runtime Chapter
232232
- [Virtual Stub Dispatch](virtual-stub-dispatch.md) Book of the Runtime Chapter
233233
- [MethodDesc](method-descriptor.md) Book of the Runtime Chapter

docs/design/coreclr/profiling/Profiler Breaking Changes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
Over time we will need to modify the Profiler APIs, this document will serve as a record of any breaking changes.
44

5-
1. Code Versioning introduced changes documented [here](../design-docs/code-versioning-profiler-breaking-changes.md)
5+
1. Code Versioning introduced changes documented [here](../../features/code-versioning-profiler-breaking-changes.md)
66
2. The work to allow adding new types and methods after module load means ICorProfilerInfo7::ApplyMetadata will now potentially trigger a GC, and will not be callable in situations where a GC can not happen (for example ICorProfilerCallback::RootReferences).
77
3. As part of the work to allow ReJIT on attach ReJITted methods will no longer be inlined (ever). Since the inlining is blocked there won't be a `ICorProfilerCallback::JITInlining` callback.

0 commit comments

Comments
 (0)