Skip to content

Fix create generic array #3158

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

Merged
merged 19 commits into from
Apr 30, 2025
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/All/Dockerfile.All
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-all:v2.57
FROM ghcr.io/nanoframework/dev-container-all:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/AzureRTOS/Dockerfile.AzureRTOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.34
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/ChibiOS/Dockerfile.ChibiOS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-chibios:v1.35
FROM ghcr.io/nanoframework/dev-container-chibios:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/ESP32/Dockerfile.ESP32
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-esp32:v2.37
FROM ghcr.io/nanoframework/dev-container-esp32:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.07
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v3.0
2 changes: 1 addition & 1 deletion .devcontainer/TI/Dockerfile.TI
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM ghcr.io/nanoframework/dev-container-ti:v1.27
FROM ghcr.io/nanoframework/dev-container-ti:v3.0
2 changes: 1 addition & 1 deletion CMake/Modules/AzureRTOS_EFM32GG11_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ macro(nf_set_link_options)

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os -flto -fuse-linker-plugin ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os")
endif()

# request specs from newlib nano
Expand Down
4 changes: 2 additions & 2 deletions CMake/Modules/FindNF_CoreCLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(NF_CoreCLR_SRCS
CLR_RT_HeapBlock_Delegate.cpp
CLR_RT_HeapBlock_Delegate_List.cpp
CLR_RT_HeapBlock_Finalizer.cpp
CLR_RT_HeapBlock_GenericInstance.cpp
CLR_RT_HeapBlock_Lock.cpp
CLR_RT_HeapBlock_LockRequest.cpp
CLR_RT_HeapBlock_Node.cpp
Expand Down Expand Up @@ -128,8 +129,7 @@ set(NF_CoreCLR_SRCS

# Runtime.Native
nf_rt_native.cpp
nf_rt_native_nanoFramework_Runtime_Hardware_SystemInfo.cpp
nf_rt_native_nanoFramework_Runtime_Native_GC.cpp
nf_rt_native_nanoFramework_Runtime_Native_SystemInfo.cpp
nf_rt_native_nanoFramework_Runtime_Native_ExecutionConstraint.cpp
nf_rt_native_nanoFramework_Runtime_Native_Power.cpp
nf_rt_native_nanoFramework_Runtime_Native_Rtc_stubs.cpp
Expand Down
2 changes: 1 addition & 1 deletion CMake/Modules/TI_SimpleLink_CC13X2_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ macro(nf_set_link_options)

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os -flto -fuse-linker-plugin ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os ")
endif()

# request specs from newlib nano
Expand Down
5 changes: 2 additions & 3 deletions CMake/binutils.AzureRTOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
#

include(binutils.common)
# include(ChibiOS_HAL)

function(nf_set_optimization_options target)

target_compile_options(${target} PRIVATE
$<$<CONFIG:Debug>:-Og -ggdb>
$<$<CONFIG:Release>:-O3 -flto>
$<$<CONFIG:MinSizeRel>:-Os -flto>
$<$<CONFIG:Release>:-O3>
$<$<CONFIG:MinSizeRel>:-Os>
$<$<CONFIG:RelWithDebInfo>:-Os -femit-class-debug-always -ggdb>
)

Expand Down
4 changes: 2 additions & 2 deletions CMake/binutils.TI_SimpleLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function(nf_set_optimization_options target)
# debug compile options: -Og (optimize for debugging) and -ggdb (produce debug symbols specifically for gdb)
target_compile_options(${target} PRIVATE
$<$<CONFIG:Debug>:-Og -ggdb>
$<$<CONFIG:Release>:-O3 -flto>
$<$<CONFIG:MinSizeRel>:-Os -flto>
$<$<CONFIG:Release>:-O3>
$<$<CONFIG:MinSizeRel>:-Os>
$<$<CONFIG:RelWithDebInfo>:-Os -ggdb>
)

Expand Down
2 changes: 1 addition & 1 deletion InteropAssemblies/CLR_RT_InteropAssembliesTable.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CLR_RT_NativeAssemblyData *g_CLR_InteropAssembliesNativeData[] =
&g_CLR_AssemblyNative_mscorlib,
&g_CLR_AssemblyNative_nanoFramework_Runtime_Native,
@CLR_RT_NativeAssemblyDataTableEntries@
NULL
nullptr
};

const uint16_t g_CLR_InteropAssembliesCount = (@CLR_RT_NativeAssembliesCount@ + 2);
22 changes: 11 additions & 11 deletions azure-pipelines-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,18 @@ jobs:
NeedsSRECORD: false
CMakePreset: ORGPAL_PALX

ST_NUCLEO64_F091RC:
TargetBoard: ST_NUCLEO64_F091RC
TargetSeries: "stm32f0xx"
BuildOptions:
NeedsDFU: false
NeedsSRECORD: true
CMakePreset: ST_NUCLEO64_F091RC
# ST_NUCLEO64_F091RC:
# TargetBoard: ST_NUCLEO64_F091RC
# TargetSeries: "stm32f0xx"
# BuildOptions:
# NeedsDFU: false
# NeedsSRECORD: true
# CMakePreset: ST_NUCLEO64_F091RC

variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('STM32_1_12_4_versioncounter', 0)]
REVISION: $[counter('STM32_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "stm32"

Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('ESP32_1_12_4_versioncounter', 0)]
REVISION: $[counter('ESP32_2_0_0_versioncounter', 0)]
IDF_PATH: "D:/a/1/s/esp-idf"
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
TargetPlatform: "esp32"
Expand Down Expand Up @@ -665,7 +665,7 @@ jobs:
variables:
DOTNET_NOLOGO: true
# creates a counter and assigns it to the revision variable
REVISION: $[counter('TI_1_12_4_versioncounter', 0)]
REVISION: $[counter('TI_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "ti_simplelink"

Expand Down Expand Up @@ -717,7 +717,7 @@ jobs:

variables:
# creates a counter and assigns it to the revision variable
REVISION: $[counter('AZURERTOS_1_12_4_versioncounter', 0)]
REVISION: $[counter('AZURERTOS_2_0_0_versioncounter', 0)]
HelperPackageVersion: $[counter('HelperPackageVersioncounter', 0)]
TargetPlatform: "efm32"

Expand Down
93 changes: 93 additions & 0 deletions azure-pipelines-templates/check-mdp-for-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.

steps:
- task: PowerShell@2
displayName: Check MDP for build
condition: ne(variables['System.PullRequest.PullRequestId'], '')
inputs:
failOnStderr: false
targetType: "inline"
script: |

# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)")))"

# find PR
"Getting PR#$env:System_PullRequest_PullRequestNumber details..." | Write-Host -ForegroundColor White -NoNewline
$pr = Invoke-WebRequest "https://api.github.com/repos/$env:Build_Repository_Name/pulls/$env:System_PullRequest_PullRequestNumber" | ConvertFrom-Json

if($($pr.number) -eq "$env:System_PullRequest_PullRequestNumber")
{
'##[command] OK' | Write-Host -ForegroundColor Green
}

# grab PR commit message
$prCommitMessage = $($pr.body)

# look for test prompt in PR commit message
# pattern is "[build with MDP buildId NNN]"

if($prCommitMessage -match "\[build with MDP buildId (\d+)\]")
{
$buildId = $matches[1]
"AZDO build ID found: $buildId" | Write-Host -ForegroundColor White

echo "##vso[task.setvariable variable=MDP_BUILDID]$buildId"
}
else
{
"No build ID found" | Write-Host -ForegroundColor Red
}
env:
GITHUB_TOKEN: $(GitHubToken)

- task: DownloadPipelineArtifact@2
condition: >-
and(
eq(variables['DownloadMDP'], true),
ne(variables['MDP_BUILDID'], '')
)
displayName: Download MDP
inputs:
buildType: specific
project: 'metadata-processor'
definition: '43'
buildVersionToDownload: specific
allowFailedBuilds: true
pipelineId: $(MDP_BUILDID)
artifactName: 'deployables'
targetPath: '$(Pipeline.Workspace)/mdp'
itemPattern: '*.MsBuildTask.dll'

- task: PowerShell@2
condition: >-
and(
succeeded(),
eq(variables['DownloadMDP'], true),
ne(variables['MDP_BUILDID'], '')
)
displayName: Copy MDP to build tool
inputs:
targetType: 'inline'
script: |
# Find which VS version is installed
$VsWherePath = "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\Installer\vswhere.exe"

Write-Output "VsWherePath is: $VsWherePath"

$VsInstance = & $VsWherePath -latest -property displayName

Write-Output "Latest VS is: $VsInstance"

# copy MDP file to msbuild location
$VsPath = & $VSWherePath -latest -property installationPath

Write-Debug "Copy MDP DLL to msbuild location"

$msbuildPath = $VsPath + "\MSBuild"

$extensionPath = $msbuildPath + "\nanoFramework\v1.0"

Copy-Item -Path "$env:Pipeline_Workspace\mdp\*" -Destination $extensionPath -Force -Verbose
5 changes: 4 additions & 1 deletion azure-pipelines-templates/publish-cloudsmith.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ steps:
or(
eq(variables['ForceUpload'], true),
and(
eq(variables['Build.SourceBranchName'], 'main'),
or(
eq(variables['Build.SourceBranchName'], 'main'),
eq(variables['Build.SourceBranchName'], 'develop')
),
eq(variables['System.PullRequest.PullRequestId'], '')
)
)
Expand Down
5 changes: 4 additions & 1 deletion azure-pipelines-templates/publish-nanoclr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ steps:
or(
eq(variables['ForceUpload'], true),
and(
eq(variables['Build.SourceBranchName'], 'main'),
or(
eq(variables['Build.SourceBranchName'], 'develop'),
eq(variables['Build.SourceBranchName'], 'main')
),
eq(variables['System.PullRequest.PullRequestId'], '')
)
)
Expand Down
Loading
Loading