Skip to content

Commit

Permalink
Merge branch 'main' into 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Dec 2, 2024
2 parents 3b824f0 + c1345b4 commit 3245f33
Show file tree
Hide file tree
Showing 120 changed files with 1,621 additions and 1,058 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ dotnet_diagnostic.CA1305.severity = none # CA1305: Specify IFormatProvide
dotnet_diagnostic.CA1307.severity = suggestion # CA1307: Specify StringComparison for clarity
dotnet_diagnostic.CA1309.severity = suggestion # CA1309: Use ordinal string comparison
dotnet_diagnostic.CA1310.severity = warning # CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1510.severity = none # CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1512.severity = none # CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1513.severity = none # CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1707.severity = none # CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1708.severity = none # CA1708: Identifiers should differ by more than case
dotnet_diagnostic.CA1710.severity = none # CA1710: Identifiers should have correct suffix
Expand All @@ -81,8 +84,10 @@ dotnet_diagnostic.CA1845.severity = none # CA1845: Use span-based 'string
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer 'AsSpan' over 'Substring'
dotnet_diagnostic.CA1847.severity = none # CA1847: Use char literal for a single character lookup
dotnet_diagnostic.CA1852.severity = suggestion # CA1852: Seal internal types
dotnet_diagnostic.CA1854.severity = suggestion # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
dotnet_diagnostic.CA1859.severity = suggestion # CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1861.severity = suggestion # CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
dotnet_diagnostic.CA2101.severity = suggestion # CA2101: Specify marshaling for P/Invoke string arguments
dotnet_diagnostic.CA2201.severity = none # CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2208.severity = suggestion # CA2208: Instantiate argument exceptions correctly
Expand All @@ -95,3 +100,6 @@ dotnet_diagnostic.CA5350.severity = suggestion # CA5350: Do Not Use Weak Crypto
dotnet_diagnostic.CA5351.severity = suggestion # CA5351: Do Not Use Broken Cryptographic Algorithms
dotnet_diagnostic.CA5359.severity = suggestion # CA5359: Do Not Disable Certificate Validation
dotnet_diagnostic.CA5372.severity = suggestion # CA5372: Use XmlReader For XPathDocument

dotnet_diagnostic.SYSLIB1045.severity = suggestion # SYSLIB1045: Use 'RegexGeneratorAttribute' to generate the regular expression implementation at compile-time
dotnet_diagnostic.SYSLIB1054.severity = suggestion # SYSLIB1054: Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest-large]

steps:
- name: Install tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -yq install mono-vbnc dos2unix
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Version Information
run: |
dotnet --info
Expand All @@ -37,9 +41,9 @@ jobs:
run: pwsh make.ps1
- name: Package
run: pwsh make.ps1 package
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: packages
name: packages-${{ matrix.os }}
path: Package/Release/Packages
- name: Test (net462)
run: ./make.ps1 -frameworks net462 test-all
Expand All @@ -50,3 +54,6 @@ jobs:
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
shell: pwsh
- name: Test (net8.0)
run: ./make.ps1 -frameworks net8.0 test-all
shell: pwsh
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "Src/DLR"]
path = Src/DLR
url = https://github.com/IronLanguages/dlr
branch = master
branch = main
9 changes: 9 additions & 0 deletions Build/net8.0-windows.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IntermediateOutputPath Condition=" '$(TargetFramework)' == 'net8.0-windows' ">$(BaseIntermediateOutputPath)$(Configuration)\net8.0</IntermediateOutputPath>
<OutputPath Condition=" '$(TargetFramework)' == 'net8.0-windows' ">$(BaseOutputPath)\net8.0</OutputPath>
</PropertyGroup>

<Import Project="net8.0.props" />
</Project>
38 changes: 38 additions & 0 deletions Build/net8.0.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFullFramework>false</IsFullFramework>
</PropertyGroup>

<PropertyGroup>
<Features>$(Features);FEATURE_APARTMENTSTATE</Features>
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
<Features>$(Features);FEATURE_CODEDOM</Features>
<Features>$(Features);FEATURE_COM</Features>
<Features>$(Features);FEATURE_CONFIGURATION</Features>
<Features>$(Features);FEATURE_CTYPES</Features>
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
<Features>$(Features);FEATURE_FILESYSTEM</Features>
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
<Features>$(Features);FEATURE_FULL_NET</Features>
<Features>$(Features);FEATURE_LCG</Features>
<Features>$(Features);FEATURE_LOADWITHPARTIALNAME</Features>
<Features>$(Features);FEATURE_METADATA_READER</Features>
<Features>$(Features);FEATURE_MMAP</Features>
<Features>$(Features);FEATURE_NATIVE</Features>
<Features>$(Features);FEATURE_OSPLATFORMATTRIBUTE</Features>
<Features>$(Features);FEATURE_PIPES</Features>
<Features>$(Features);FEATURE_PROCESS</Features>
<Features>$(Features);FEATURE_REFEMIT</Features>
<Features>$(Features);FEATURE_REGISTRY</Features>
<Features>$(Features);FEATURE_RUNTIMEINFORMATION</Features>
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
<Features>$(Features);FEATURE_STACK_TRACE</Features>
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
<Features>$(Features);FEATURE_THREAD</Features>
<Features>$(Features);FEATURE_XMLDOC</Features>
</PropertyGroup>
</Project>
9 changes: 9 additions & 0 deletions Build/net9.0-windows.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IntermediateOutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseIntermediateOutputPath)$(Configuration)\net9.0</IntermediateOutputPath>
<OutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseOutputPath)\net9.0</OutputPath>
</PropertyGroup>

<Import Project="net9.0.props" />
</Project>
38 changes: 38 additions & 0 deletions Build/net9.0.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsFullFramework>false</IsFullFramework>
</PropertyGroup>

<PropertyGroup>
<Features>$(Features);FEATURE_APARTMENTSTATE</Features>
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
<Features>$(Features);FEATURE_CODEDOM</Features>
<Features>$(Features);FEATURE_COM</Features>
<Features>$(Features);FEATURE_CONFIGURATION</Features>
<Features>$(Features);FEATURE_CTYPES</Features>
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
<Features>$(Features);FEATURE_FILESYSTEM</Features>
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
<Features>$(Features);FEATURE_FULL_NET</Features>
<Features>$(Features);FEATURE_LCG</Features>
<Features>$(Features);FEATURE_LOADWITHPARTIALNAME</Features>
<Features>$(Features);FEATURE_METADATA_READER</Features>
<Features>$(Features);FEATURE_MMAP</Features>
<Features>$(Features);FEATURE_NATIVE</Features>
<Features>$(Features);FEATURE_OSPLATFORMATTRIBUTE</Features>
<Features>$(Features);FEATURE_PIPES</Features>
<Features>$(Features);FEATURE_PROCESS</Features>
<Features>$(Features);FEATURE_REFEMIT</Features>
<Features>$(Features);FEATURE_REGISTRY</Features>
<Features>$(Features);FEATURE_RUNTIMEINFORMATION</Features>
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
<Features>$(Features);FEATURE_STACK_TRACE</Features>
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
<Features>$(Features);FEATURE_THREAD</Features>
<Features>$(Features);FEATURE_XMLDOC</Features>
</PropertyGroup>
</Project>
49 changes: 23 additions & 26 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,23 @@ steps:
version: '3.1.x'

- task: UseDotNet@2
displayName: Install .NET 6.0 SDK for build
displayName: Install .NET 6.0 runtime for testing
inputs:
packageType: 'sdk'
packageType: 'runtime'
version: '6.0.x'

- task: UseDotNet@2
displayName: Install .NET 8.0 SDK for build
inputs:
packageType: 'sdk'
version: '8.0.x'

# Set Mono version on macOS
- ${{ if eq(parameters.os, 'macOS') }}:
- task: ms-devlabs.utilitytasks.task-Shellpp.Shell++@0
- task: Bash@3
displayName: Set Mono Version
inputs:
type: InlineScript
targetType: inline
script: |
# use Mono 6.4.0 version
SYMLINK=6.4.0
Expand All @@ -52,31 +58,22 @@ steps:
# Install mono when running on Linux
- ${{ if eq(parameters.os, 'Linux') }}:
- task: ms-devlabs.utilitytasks.task-Shellpp.Shell++@0
displayName: Version Information
- task: Bash@3
displayName: Install tools
inputs:
type: InlineScript
targetType: inline
script: |
# Testing and packaging tools
sudo apt-get -yq install mono-vbnc dos2unix fakeroot
sudo apt-get -yq install mono-vbnc dos2unix
# Dump some info about the tools
mono --version
msbuild /version
dotnet --info
df -Th
# Dump version info on macOS
- ${{ if eq(parameters.os, 'macOS') }}:
- task: ms-devlabs.utilitytasks.task-Shellpp.Shell++@0
displayName: Version Information
inputs:
type: InlineScript
script: |
# Dump some info about the tools
mono --version
msbuild /version
dotnet --info
# Dump version info
- task: PowerShell@2
displayName: Version Information
inputs:
targetType: inline
script: |
dotnet --info
try { msbuild -version } catch { }
try { mono --version } catch { }
- powershell: ./make.ps1
displayName: Build
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<AssemblyFileRevision Condition="'$(ReleaseLevel)' == 'final'">1000</AssemblyFileRevision>

<Product>IronPython</Product>
<Company>IronPython Team</Company>
<CopyrightIronPython Contributors</Copyright>
<Company>.NET Foundation</Company>
<Copyright.NET Foundation and Contributors</Copyright>
<AssemblyVersion>$(MajorVersion).$(MinorVersion).$(MicroVersion).$(AssemblyRevision)</AssemblyVersion>
<FileVersion>$(MajorVersion).$(MinorVersion).$(MicroVersion).$(AssemblyFileRevision)</FileVersion>
<InformationalVersion>$(MSBuildProjectName) $(MajorVersion).$(MinorVersion).$(MicroVersion) $(ReleaseLevel) $(ReleaseSerial)</InformationalVersion>
Expand Down Expand Up @@ -121,7 +121,7 @@

<!-- Release -->
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DebugSymbols>false</DebugSymbols>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
Expand Down
10 changes: 5 additions & 5 deletions Documentation/getting-the-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The main IronPython3 git repository is at [http://github.com/IronLanguages/ironp

## Downloading the sources

You can [download a zipped copy](http://github.com/IronLanguages/ironpython3/zipball/master) of the latest IronPython3 sources as well.
You can [download a zipped copy](http://github.com/IronLanguages/ironpython3/zipball/main) of the latest IronPython3 sources as well.

### Installing GIT

Expand All @@ -15,7 +15,7 @@ The following links include resources for installing and using GIT:

### Creating a local GIT repository

You will first need to fork the IronPython3 project. [Creating a fork](https://help.github.com/fork-a-repo/) is recommended as it will allow you to contribute patches back easily. Click the "Fork" button on [https://github.com/IronLanguages/ironpython3/](https://github.com/IronLanguages/ironpython3/). This should create your personal fork, with a web URL like http://github.com/janedoe/ironpython3 (where janedoe is your github username).
You will first need to fork the IronPython3 project. [Creating a fork](https://help.github.com/fork-a-repo/) is recommended as it will allow you to contribute patches back easily. Click the "Fork" button on [https://github.com/IronLanguages/ironpython3/](https://github.com/IronLanguages/ironpython3/). This should create your personal fork, with a web URL like http://github.com/janedoe/ironpython3 (where janedoe is your github username).

You can now use the git command-line client with many Linux distributions, Mac OS, Cygwin, and Windows (msysgit) to get the sources onto your local computer using the following commands:

Expand All @@ -27,13 +27,13 @@ git config --global user.email [email protected]
git clone [email protected]:janedoe/ironpython3.git
cd ironpython3
git remote add ironpython3 git://github.com/IronLanguages/ironpython3.git
git pull ironpython3 master
git pull ironpython3 main
```

At a later date, to get the latest updates from the IronPython3 project, run the following command in the ironpython3 directory created above:

```
git pull ironpython3 master
git pull ironpython3 main
```

If there is a merge conflict, edit the unmerged files to remove the conflict markers, and then run the following command:
Expand All @@ -59,4 +59,4 @@ The DLR (Dynamic Language Runtime) is a submodule of the ironpython3 repository,
git submodule update --init
```

For more information there is an excellent tutorial on [getting started with git](http://kylecordes.com/2008/04/30/git-windows-go/)
For more information there is an excellent tutorial on [getting started with git](http://kylecordes.com/2008/04/30/git-windows-go/)
8 changes: 4 additions & 4 deletions Documentation/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Use Powershell's `help` command on the script for information about available op
The script is also available online, so it can be downloaded and invoked without unzipping the archive first.

```
PS> Invoke-WebRequest https://raw.githubusercontent.com/IronLanguages/ironpython3/master/Src/Scripts/Install-IronPython.ps1 -OutFile ./Install-IronPython.ps1
PS> Invoke-WebRequest https://raw.githubusercontent.com/IronLanguages/ironpython3/main/Src/Scripts/Install-IronPython.ps1 -OutFile ./Install-IronPython.ps1
PS> ./Install-IronPython ~/ipyenv ~/Downloads/IronPython.3.X.Y.zip
PS> ~/ipyenv/Enter-IronPythonEnvironment
«ipyenv» PS> ipy
Expand Down Expand Up @@ -146,7 +146,7 @@ It is recommended to create one's own launcher script launching the newer IronPy

After a release, the development of IronPython continues so it is possible that a bug or a feature that is important to you was handled after the latest release. As each commit to the main project branch creates precompiled artifacts, it is still possible to install the relevant (or latest development) version of IronPython without the need to compile the whole project from scratch.

Go to the project's [_Actions_ page](https://github.com/IronLanguages/ironpython3/actions) and find the commit you are interested in. Or simply find the topmost commit to `master` that has all tests passing. The _Status_ and _Branch_ filters in the top bar are helpful to narrow the list down. Then click on the commit hyperlink to access the CI run summary. At the bottom of that page there is artifact `packages`, which contains all binary artifacts the project produces. Download it and unzip. Choose the right package for your needs and follow instructions above for the officially released artifacts. For convenience, here is a table with usable packages:
Go to the project's [_Actions_ page](https://github.com/IronLanguages/ironpython3/actions) and find the commit you are interested in. Or simply find the topmost commit to `main` that has all tests passing. The _Status_ and _Branch_ filters in the top bar are helpful to narrow the list down. Then click on the commit hyperlink to access the CI run summary. At the bottom of that page there is artifact `packages`, which contains all binary artifacts the project produces. Download it and unzip. Choose the right package for your needs and follow instructions above for the officially released artifacts. For convenience, here is a table with usable packages:

| Artifact | Framework | Operating System |
| -------------------- | ------------------------------ | ----------------------------------- |
Expand All @@ -158,7 +158,7 @@ Go to the project's [_Actions_ page](https://github.com/IronLanguages/ironpython

# Installing from Sources

To build and install IronPython from sources, first follow instructions in [_Getting the Sources_](https://github.com/IronLanguages/ironpython3/blob/master/Documentation/getting-the-sources.md) and [_Building IronPython3_](https://github.com/IronLanguages/ironpython3/blob/master/Documentation/building.md).
To build and install IronPython from sources, first follow instructions in [_Getting the Sources_](https://github.com/IronLanguages/ironpython3/blob/main/Documentation/getting-the-sources.md) and [_Building IronPython3_](https://github.com/IronLanguages/ironpython3/blob/main/Documentation/building.md).

When the command `./make.ps1 debug` completes successfully, runnable and usable `ipy` executables are available in subdirectories of `./bin/Debug`. To run executables from the release configuration (produced by a successful run of `./make.ps1`), first set environment variable `IRONPYTHONPATH`.

Expand All @@ -170,7 +170,7 @@ If those executables test out successfully, the binaries can be installed outsid

The artifacts are placed in directory `./Package/Release/Packages/IronPython-3.X.Y`. Pick a package suitable for your installation target and follow instructions above for the officially released packages.

Note: as a convenience, if you run `Install-IronPython.ps1` directly from directory `./Src/Scripts` to install IronPython from the zip file, there is no need to pass the location to the zip file; the script finds it automatically using the relative path.
Note: as a convenience, if you run `Install-IronPython.ps1` directly from directory `./Src/Scripts` to install IronPython from the zip file, there is no need to pass the location to the zip file; the script finds it automatically using the relative path.

Installation example:

Expand Down
Loading

0 comments on commit 3245f33

Please sign in to comment.