Skip to content

Adjusted regex to properly handle Windows paths #8518

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

N-Olbert
Copy link
Contributor

Summary of the changes (Less than 80 chars)

  • Fix Regex to consider Windows file path format

Closes #8517

@N-Olbert
Copy link
Contributor Author

N-Olbert commented Aug 10, 2025

Maybe adding something like

<PropertyGroup>
  <PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap>
</PropertyGroup>

to Directory.Build.Props would also be an option. This would make the entire StackTraceHelper obsolete and all stack traces deterministic.

The output of FilterInputType_Should_ThrowException_WhenNoConventionIsRegisteredDefault with that setting is:

For more details look at the `Errors` property.

1. For more details look at the `Errors` property.

1. No default filter convention found. Call `AddFiltering()` on the schema builder.
 (HotChocolate.Types.ObjectType)

   at HotChocolate.Data.FilterDescriptorContextExtensions.<>c__DisplayClass1_0.<GetFilterConvention>b__0() in ./HotChocolate/Data/src/Data/Filters/Extensions/FilterDescriptorContextExtensions.cs:line 19
   at HotChocolate.Types.Descriptors.DescriptorContext.GetConventionOrDefault[T](Func`1 factory, String scope) in ./HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DescriptorContext.cs:line 165
   at HotChocolate.Data.FilterDescriptorContextExtensions.GetFilterConvention(IDescriptorContext context, String scope) in ./HotChocolate/Data/src/Data/Filters/Extensions/FilterDescriptorContextExtensions.cs:line 18
   at HotChocolate.Types.FilterObjectFieldDescriptorExtensions.<>c__DisplayClass5_0.<UseFiltering>b__1(IDescriptorContext c, ObjectFieldConfiguration definition) in ./HotChocolate/Data/src/Data/Filters/Extensions/FilterObjectFieldDescriptorExtensions.cs:line 128
   at HotChocolate.Types.Descriptors.DescriptorBase`1.<>c__DisplayClass21_0.<OnBeforeCreate>b__0(IDescriptorContext c, ITypeSystemConfiguration d) in ./HotChocolate/Core/src/Types/Types/Descriptors/DescriptorBase~1.cs:line 97
   at HotChocolate.Types.Descriptors.Configurations.OnCreateTypeSystemConfigurationTask.Configure(IDescriptorContext context) in ./HotChocolate/Core/src/Types/Types/Descriptors/Configurations/OnCreateTypeSystemConfigurationTask.cs:line 26
   at HotChocolate.Types.Descriptors.DescriptorBase`1.CreateConfiguration() in ./HotChocolate/Core/src/Types/Types/Descriptors/DescriptorBase~1.cs:line 57
   at HotChocolate.Types.Descriptors.ObjectTypeDescriptor.OnCreateConfiguration(ObjectTypeConfiguration definition) in ./HotChocolate/Core/src/Types/Types/Descriptors/ObjectTypeDescriptor.cs:line 94
   at HotChocolate.Types.Descriptors.DescriptorBase`1.CreateConfiguration() in ./HotChocolate/Core/src/Types/Types/Descriptors/DescriptorBase~1.cs:line 45
   at HotChocolate.Types.ObjectType.CreateConfiguration(ITypeDiscoveryContext context) in ./HotChocolate/Core/src/Types/Types/ObjectType.Initialization.cs:line 37
   at HotChocolate.Types.TypeSystemObject`1.Initialize(ITypeDiscoveryContext context) in ./HotChocolate/Core/src/Types/Types/TypeSystemObjectBase~1.cs:line 29
   at HotChocolate.Configuration.TypeRegistrar.InitializeType(TypeSystemObject typeSystemObject, String scope, Boolean isInferred) in ./HotChocolate/Core/src/Types/Configuration/TypeRegistrar.cs:line 177

I can provide a PR if requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SchemaException: Stacktrace differs on Unix vs. Windows / Test failure on Windows
1 participant