Skip to content

Commit

Permalink
Increase MaxDepth on JSON serializer for cache file. Should eventuall…
Browse files Browse the repository at this point in the history
…y be using some different format.
  • Loading branch information
wasabii committed Dec 12, 2023
1 parent 03201ba commit 0bbd925
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemResolve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class MavenReferenceItemResolve : Task
new RemoteRepositoryJsonConverter(),
new VersionJsonConverter(),
new VersionConstraintJsonConverter(),
}
},
MaxDepth = 1024,
};

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/IKVM.Maven.Sdk.Tasks/MavenRepositoryItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
Expand Down Expand Up @@ -37,12 +38,14 @@ public MavenRepositoryItem(string id, string url)
/// ID of the repository.
/// </summary>
[JsonProperty("id")]
[JsonPropertyName("id")]
public string Id { get; set; }

/// <summary>
/// URL of the repository.
/// </summary>
[JsonProperty("url")]
[JsonPropertyName("url")]
public string Url { get; set; }

public override bool Equals(object obj)
Expand Down
6 changes: 5 additions & 1 deletion src/IKVM.Maven.Sdk.Tasks/MavenResolveCacheFile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using IKVM.Maven.Sdk.Tasks.Aether;
using System.Text.Json.Serialization;

using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
Expand All @@ -18,24 +18,28 @@ class MavenResolveCacheFile
/// Version of the cache file.
/// </summary>
[JsonProperty("version")]
[JsonPropertyName("version")]
public int Version { get; set; }

/// <summary>
/// Repositories against which resolution happened.
/// </summary>
[JsonProperty("repositories")]
[JsonPropertyName("repositories")]
public MavenRepositoryItem[] Repositories { get; set; }

/// <summary>
/// Set of maven references that have been previously resolved.
/// </summary>
[JsonProperty("dependencies")]
[JsonPropertyName("dependencies")]
public Dependency[] Dependencies { get; set; }

/// <summary>
/// Result of previous resolution
/// </summary>
[JsonProperty("graph")]
[JsonPropertyName("graph")]
public DefaultDependencyNode Graph { get; set; }

}
Expand Down

0 comments on commit 0bbd925

Please sign in to comment.