Skip to content
Open
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
3 changes: 2 additions & 1 deletion .agents/skills/run-apichief/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ Default to `emit baseline` if the user only asks to "run ApiChief".

### 1. Identify the target project(s)

- Match user intent against project folders under `src/` such as `EFCore`, `EFCore.Cosmos`, `EFCore.Relational`, or `Microsoft.Data.Sqlite.Core`.
- Match user intent against project folders under `src/`.
- Ask for clarification only if the target is ambiguous.
- The checked-in baseline path convention in this repo is `src/<ProjectName>/<ProjectName>.baseline.json`.
- If asked just to update the baselines, run EFCore.ApiBaseline.Tests tests and skip the rest of the steps below.

### 2. Prepare the environment

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,10 @@ protected virtual void ValidateVectorIndex(
string.Join(",", index.Properties.Select(e => e.Name))));
}

if (index.Properties[0].GetVectorDistanceFunction() == null
|| index.Properties[0].GetVectorDimensions() == null)
var firstIndexProperty = index.Properties[0] as IProperty;
if (firstIndexProperty == null
|| firstIndexProperty.GetVectorDistanceFunction() == null
|| firstIndexProperty.GetVectorDimensions() == null)
{
throw new InvalidOperationException(
CosmosStrings.VectorIndexOnNonVector(
Expand All @@ -542,7 +544,9 @@ protected virtual void ValidateFullTextIndex(
string.Join(",", index.Properties.Select(e => e.Name))));
}

if (index.Properties[0].GetIsFullTextSearchEnabled() != true)
var firstFullTextProperty = index.Properties[0] as IProperty;
if (firstFullTextProperty == null
|| firstFullTextProperty.GetIsFullTextSearchEnabled() != true)
{
throw new InvalidOperationException(
CosmosStrings.FullTextIndexOnNonFullTextProperty(
Expand Down
4 changes: 2 additions & 2 deletions src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private static async Task<bool> CreateContainerIfNotExistsOnceAsync(
}

vectorIndexes.Add(
new VectorIndexPath { Path = GetJsonPropertyPathFromRoot(index.Properties[0]), Type = vectorIndexType.Value });
new VectorIndexPath { Path = GetJsonPropertyPathFromRoot((IReadOnlyProperty)index.Properties[0]), Type = vectorIndexType.Value });
}

if (index.IsFullTextIndex() == true)
Expand All @@ -213,7 +213,7 @@ private static async Task<bool> CreateContainerIfNotExistsOnceAsync(
}

fullTextIndexPaths.Add(
new FullTextIndexPath { Path = GetJsonPropertyPathFromRoot(index.Properties[0]) });
new FullTextIndexPath { Path = GetJsonPropertyPathFromRoot((IReadOnlyProperty)index.Properties[0]) });
}
}

Expand Down
106 changes: 53 additions & 53 deletions src/EFCore.Design/Properties/DesignStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions src/EFCore.Design/Properties/DesignStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@
<data name="BadMigrationName" xml:space="preserve">
<value>The migration name '{name}' is not valid. Migration names cannot contain any of the following characters: '{characters}'.</value>
</data>
<data name="MigrationNameRequired" xml:space="preserve">
<value>A migration name must be specified.</value>
</data>
<data name="BadSequenceType" xml:space="preserve">
<value>Sequence '{sequenceName}' cannot be scaffolded because it uses type '{typeName}' which is unsupported.</value>
</data>
Expand Down Expand Up @@ -193,6 +190,9 @@ Consider changing your target project to the DbContext project by using the Pack
<data name="CouldNotGetInterceptableLocation" xml:space="preserve">
<value>Couldn't get interceptable location for: '{node}'.</value>
</data>
<data name="CreatingAndApplyingMigration" xml:space="preserve">
<value>Creating and applying migration '{migrationName}'.</value>
</data>
<data name="DatabaseDropped" xml:space="preserve">
<value>Successfully dropped database '{name}'.</value>
</data>
Expand All @@ -208,6 +208,9 @@ Consider changing your target project to the DbContext project by using the Pack
<data name="DuplicateMigrationName" xml:space="preserve">
<value>The name '{migrationName}' is used by an existing migration.</value>
</data>
<data name="DynamicMigrationNotFound" xml:space="preserve">
<value>The dynamic migration '{migrationId}' was not found. Only migrations applied in the current session using CreateAndApplyMigration can be reverted.</value>
</data>
<data name="DynamicQueryNotSupported" xml:space="preserve">
<value>Dynamic LINQ queries are not supported when precompiling queries.</value>
</data>
Expand Down Expand Up @@ -289,14 +292,27 @@ Consider changing your target project to the DbContext project by using the Pack
<data name="ManuallyDeleted" xml:space="preserve">
<value>The model snapshot and the backing model of the last migration are different. Continuing under the assumption that the last migration was deleted manually.</value>
</data>
<data name="MigrationCompilationFailed" xml:space="preserve">
<value>Failed to compile migration '{migrationId}'. Errors:
{errors}</value>
</data>
<data name="MigrationCreatedAndApplied" xml:space="preserve">
<value>Migration '{migrationId}' was successfully created and applied.</value>
</data>
<data name="MigrationDescription" xml:space="preserve">
<value>The target migration. If '0', all migrations will be reverted. Defaults to the last migration.</value>
</data>
<data name="MigrationNameRequired" xml:space="preserve">
<value>A migration name must be specified.</value>
</data>
<data name="MigrationsAssemblyMismatch" xml:space="preserve">
<value>Your target project '{assembly}' doesn't match your migrations assembly '{migrationsAssembly}'. Either change your target project or change your migrations assembly.
Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b =&gt; b.MigrationsAssembly("{assembly}")). By default, the migrations assembly is the assembly containing the DbContext.
Change your target project to the migrations project by using the Package Manager Console's Default project drop-down list, or by executing "dotnet ef" from the directory containing the migrations project.</value>
</data>
<data name="MigrationTypeNotFound" xml:space="preserve">
<value>Could not find migration type with ID '{migrationId}' in the compiled assembly.</value>
</data>
<data name="MSBuildWorkspaceDiagnostics" xml:space="preserve">
<value>MSBuild Workspace diagnostics:{diagnostics}</value>
</data>
Expand Down Expand Up @@ -342,6 +358,9 @@ Change your target project to the migrations project by using the Package Manage
<data name="NoDesignTimeServices" xml:space="preserve">
<value>No design-time services were found.</value>
</data>
<data name="NoDynamicMigrationsToRevert" xml:space="preserve">
<value>No dynamic migrations have been applied in the current session. Only migrations applied using CreateAndApplyMigration can be reverted with RevertMigration.</value>
</data>
<data name="NoLanguageService" xml:space="preserve">
<value>The project language '{language}' isn't supported by the built-in {service} service. You can try looking for an additional NuGet package which supports this language; moving your DbContext type to a C# class library referenced by this project; or manually implementing and registering the design-time service for the programming language.</value>
</data>
Expand All @@ -360,12 +379,6 @@ Change your target project to the migrations project by using the Package Manage
<data name="NoPendingModelChanges" xml:space="preserve">
<value>No changes have been made to the model since the last migration.</value>
</data>
<data name="NoDynamicMigrationsToRevert" xml:space="preserve">
<value>No dynamic migrations have been applied in the current session. Only migrations applied using CreateAndApplyMigration can be reverted with RevertMigration.</value>
</data>
<data name="DynamicMigrationNotFound" xml:space="preserve">
<value>The dynamic migration '{migrationId}' was not found. Only migrations applied in the current session using CreateAndApplyMigration can be reverted.</value>
</data>
<data name="NoReferencedServices" xml:space="preserve">
<value>No referenced design-time services were found.</value>
</data>
Expand Down Expand Up @@ -499,17 +512,4 @@ Change your target project to the migrations project by using the Package Manage
<data name="WritingSnapshot" xml:space="preserve">
<value>Writing model snapshot to '{file}'.</value>
</data>
<data name="MigrationCompilationFailed" xml:space="preserve">
<value>Failed to compile migration '{migrationId}'. Errors:
{errors}</value>
</data>
<data name="MigrationTypeNotFound" xml:space="preserve">
<value>Could not find migration type with ID '{migrationId}' in the compiled assembly.</value>
</data>
<data name="CreatingAndApplyingMigration" xml:space="preserve">
<value>Creating and applying migration '{migrationName}'.</value>
</data>
<data name="MigrationCreatedAndApplied" xml:space="preserve">
<value>Migration '{migrationId}' was successfully created and applied.</value>
</data>
</root>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version: 17.0.0.0
// Runtime Version: 18.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand All @@ -21,7 +21,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal
/// <summary>
/// Class to produce the template output
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "18.0.0.0")]
public partial class CSharpDbContextGenerator : CSharpDbContextGeneratorBase
{
/// <summary>
Expand Down Expand Up @@ -603,7 +603,7 @@ public virtual void Initialize()
/// <summary>
/// Base class for this transformation
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "18.0.0.0")]
public class CSharpDbContextGeneratorBase
{
#region Fields
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version: 17.0.0.0
// Runtime Version: 18.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Comment thread
AndriySvyryd marked this conversation as resolved.
Expand All @@ -21,7 +21,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal
/// <summary>
/// Class to produce the template output
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "18.0.0.0")]
public partial class CSharpEntityTypeGenerator : CSharpEntityTypeGeneratorBase
{
/// <summary>
Expand Down Expand Up @@ -400,7 +400,7 @@ public virtual void Initialize()
/// <summary>
/// Base class for this transformation
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "18.0.0.0")]
public class CSharpEntityTypeGeneratorBase
{
#region Fields
Expand All @@ -415,7 +415,7 @@ public class CSharpEntityTypeGeneratorBase
/// <summary>
/// The string builder that generation-time code is using to assemble generated output
/// </summary>
protected System.Text.StringBuilder GenerationEnvironment
public System.Text.StringBuilder GenerationEnvironment
Comment thread
AndriySvyryd marked this conversation as resolved.
{
get
{
Expand Down
Loading
Loading