Skip to content

Commit

Permalink
Rollback interfaces (#3540)
Browse files Browse the repository at this point in the history
* initial nuget references

* fmt

* remove unused revit dependency

* Don't use new solution

* remove unused file

* update core

* Manage V3 versions centrally (exception AutoCAD)

* fixed up multiple autocad versions

* Removal of Revit interfaces

* Remove Rhino interfaces

* fix up project dependencies

* some changes from reviewing

* Merge remote-tracking branch 'origin/dui3/alpha' into rollback-interfaces

* merge fixes and fmt

* more review changes

* more fixes

* recheck lock files

* fix caching

* logger IOC fixes

* fix IOC and fmt

* try stuff for columns?

* use less nullables and revit root properly
  • Loading branch information
adamhathcock authored Jun 27, 2024
1 parent 980b75d commit cd39d86
Show file tree
Hide file tree
Showing 194 changed files with 2,196 additions and 3,791 deletions.
19 changes: 0 additions & 19 deletions All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B1324D25
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2023.Tests", "DUI3-DX\Converters\Revit\Speckle.Converters.Revit2023.Tests\Speckle.Converters.Revit2023.Tests.csproj", "{AEC26A0B-25F3-4544-A9D6-A427BFF79250}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Common.Tests", "DUI3-DX\Sdk\Speckle.Converters.Common.Tests\Speckle.Converters.Common.Tests.csproj", "{95E23A97-E5EA-4506-A52C-D3DA9012DA02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Civil3d2024", "DUI3-DX\Connectors\Autocad\Speckle.Connectors.Civil3d2024\Speckle.Connectors.Civil3d2024.csproj", "{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2024", "DUI3-DX\Converters\Autocad\2024\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj", "{C9C28F31-1367-438C-83B0-049C3B3A3E3B}"
Expand Down Expand Up @@ -2816,22 +2814,6 @@ Global
{AEC26A0B-25F3-4544-A9D6-A427BFF79250}.Release|Any CPU.Build.0 = Release|Any CPU
{AEC26A0B-25F3-4544-A9D6-A427BFF79250}.Release|x64.ActiveCfg = Release|Any CPU
{AEC26A0B-25F3-4544-A9D6-A427BFF79250}.Release|x64.Build.0 = Release|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug Mac|x64.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug|x64.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Debug|x64.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release Mac|Any CPU.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release Mac|Any CPU.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release Mac|x64.ActiveCfg = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release Mac|x64.Build.0 = Debug|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release|Any CPU.Build.0 = Release|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release|x64.ActiveCfg = Release|Any CPU
{95E23A97-E5EA-4506-A52C-D3DA9012DA02}.Release|x64.Build.0 = Release|Any CPU
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -3092,7 +3074,6 @@ Global
{70DEAA13-6DC8-44A0-B287-9E806A8054F1} = {890F3257-FCC2-4ED8-9180-22B3641B494C}
{F06E4C37-4076-4272-9CA6-FB505E02CD31} = {BE521908-7944-46F3-98BF-B47D34509934}
{AEC26A0B-25F3-4544-A9D6-A427BFF79250} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{95E23A97-E5EA-4506-A52C-D3DA9012DA02} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{DDBBA313-69A6-40DE-AB3A-79EE5BF32A7E} = {743489BF-1941-43D5-8AF9-35C56D0DCC34}
{C9C28F31-1367-438C-83B0-049C3B3A3E3B} = {804E065F-914C-414A-AF84-009312C3CFF6}
{06082BAA-98E8-49B1-9D33-252B126A0561} = {804E065F-914C-414A-AF84-009312C3CFF6}
Expand Down
6 changes: 1 addition & 5 deletions Build/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ namespace Build;
public static class Consts
{
public static readonly string[] Solutions = { "DUI3-DX.slnf" };
public static readonly string[] TestProjects =
{
"Speckle.Converters.Revit2023.Tests",
"Speckle.Converters.Common.Tests"
};
public static readonly string[] TestProjects = System.Array.Empty<string>();

public static readonly InstallerProject[] InstallerManifests =
{
Expand Down
2 changes: 0 additions & 2 deletions DUI3-DX.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"DUI3-DX\\Converters\\Autocad\\2024\\Speckle.Converters.Autocad2024\\Speckle.Converters.Autocad2024.csproj",
"DUI3-DX\\Converters\\Autocad\\Speckle.Converters.AutocadShared\\Speckle.Converters.AutocadShared.shproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.Revit2023.DependencyInjection\\Speckle.Converters.Revit2023.DependencyInjection.csproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.Revit2023.Tests\\Speckle.Converters.Revit2023.Tests.csproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.Revit2023\\Speckle.Converters.Revit2023.csproj",
"DUI3-DX\\Converters\\Revit\\Speckle.Converters.RevitShared\\Speckle.Converters.RevitShared.shproj",
"DUI3-DX\\Converters\\Rhino\\Speckle.Converters.Rhino7.DependencyInjection\\Speckle.Converters.Rhino7.DependencyInjection.csproj",
Expand All @@ -28,7 +27,6 @@
"DUI3-DX\\Sdk\\Speckle.Autofac\\Speckle.Autofac.csproj",
"DUI3-DX\\Sdk\\Speckle.Connectors.Utils\\Speckle.Connectors.Utils.csproj",
"DUI3-DX\\Sdk\\Speckle.Converters.Common.DependencyInjection\\Speckle.Converters.Common.DependencyInjection.csproj",
"DUI3-DX\\Sdk\\Speckle.Converters.Common.Tests\\Speckle.Converters.Common.Tests.csproj",
"DUI3-DX\\Sdk\\Speckle.Converters.Common\\Speckle.Converters.Common.csproj"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,42 +272,11 @@
"Serilog": "2.10.0"
}
},
"Speckle.Core": {
"type": "Transitive",
"resolved": "3.0.1-alpha.11",
"contentHash": "Zt2dBJLlfziEACYCHThbhKypSjhoA01rTw9BzNI72c/BDyftXIz70Tetq/8ZMEqQnKqfmRyYADsAdWKxpdV0Hg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"Speckle.Objects": {
"type": "Transitive",
"resolved": "3.0.1-alpha.11",
"contentHash": "YR7sei3OQBAi8R/kIu8bEmg5ELDIJK6l5fhOgdnqA9ZvD/fvmRb+09z8lIUTDsgdAdvYU/A/x9VxH9OGPbp9Kw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.11"
}
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,6 @@
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Mapster": {
"type": "Transitive",
"resolved": "7.3.0",
"contentHash": "NrCUX/rJa5PTyo6iW4AL5dZLU9PDNlYnrJOVjgdpo5OQM9EtWH2CMHnC5sSuJWC0d0b0SnmeRrIviEem6WxtuQ==",
"dependencies": {
"Mapster.Core": "1.2.0",
"Microsoft.CSharp": "4.3.0",
"System.Reflection.Emit": "4.3.0"
}
},
"Mapster.Core": {
"type": "Transitive",
"resolved": "1.2.0",
"contentHash": "TNdqZk2zAuBYfJF88D/3clQTOyOdqr1crU81yZQtlGa+e7FYWhJdK/buBWT+TpM3qQko9UzmzfOT4iq3JCs/ZA=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "7.0.0",
Expand Down Expand Up @@ -310,11 +295,6 @@
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"Speckle.Revit.API": {
"type": "Transitive",
"resolved": "2023.0.0",
"contentHash": "tq40eD7psgTbV+epNouYyqfo6+hEi7FmXZqcxEOsAV7zfYyWhL6Rt3vmojkWGNuerGbH6oRI6KIIxrnlCNb8Hw=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
Expand Down Expand Up @@ -407,11 +387,6 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Reflection.Emit": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
Expand Down Expand Up @@ -509,16 +484,15 @@
"type": "Project",
"dependencies": {
"Speckle.Converters.Common": "[2.0.999-local, )",
"Speckle.Revit2023.Interfaces": "[0.1.1-preview.0.28, )"
"Speckle.Revit.API": "[2023.0.0, )"
}
},
"speckle.converters.revit2023.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Converters.Common": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )",
"Speckle.Converters.Revit2023": "[2.0.999-local, )",
"Speckle.Revit2023.Api": "[0.1.1-preview.0.28, )"
"Speckle.Converters.Revit2023": "[2.0.999-local, )"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
Expand Down Expand Up @@ -574,22 +548,11 @@
"Speckle.Core": "3.0.1-alpha.11"
}
},
"Speckle.Revit2023.Api": {
"type": "CentralTransitive",
"requested": "[0.1.1-preview.0.28, )",
"resolved": "0.1.1-preview.0.28",
"contentHash": "ejwYS/HI8yy0rJE4vgTr5aj8Fkg/E9JnMGjwyVS2fLtI4f7+FmwAY6inTUT2p/RAoRc2nQw+TerDpUtOhddzag==",
"dependencies": {
"Mapster": "7.3.0",
"Speckle.Revit.API": "2023.0.0",
"Speckle.Revit2023.Interfaces": "0.1.1-preview.0.28"
}
},
"Speckle.Revit2023.Interfaces": {
"Speckle.Revit.API": {
"type": "CentralTransitive",
"requested": "[0.1.1-preview.0.28, )",
"resolved": "0.1.1-preview.0.28",
"contentHash": "7szXg/vRvP3Wdrn2ZGriVOfsw+bddlpVorBkCIhSHHs5qVTTG8IAIrI1l9dO0/aullaTMF+Xgxm9x3w1aXPiuA=="
"requested": "[2023.0.0, )",
"resolved": "2023.0.0",
"contentHash": "tq40eD7psgTbV+epNouYyqfo6+hEi7FmXZqcxEOsAV7zfYyWhL6Rt3vmojkWGNuerGbH6oRI6KIIxrnlCNb8Hw=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.Revit.Plugin;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Connectors.Utils;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Core.Logging;

namespace Speckle.Connectors.DUI.Bindings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Converters.RevitShared.Helpers;

namespace Speckle.Connectors.Revit.Bindings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.Revit.Plugin;
using Speckle.Connectors.Utils;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Cancellation;
using Speckle.Connectors.Utils.Operations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Revit.Plugin;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Converters.Common;
using Speckle.Converters.RevitShared.Helpers;

namespace Speckle.Connectors.Revit.Bindings;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
using Speckle.Connectors.Revit.HostApp;
using Speckle.Connectors.Revit.Operations.Send;
using Speckle.Connectors.Revit.Plugin;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;
using Speckle.Converters.Common;
using Speckle.Revit.Api;
using Speckle.Revit.Interfaces;

namespace Speckle.Connectors.Revit.DependencyInjection;

Expand All @@ -29,11 +25,7 @@ public void Load(SpeckleContainerBuilder builder)
builder.AddAutofac();
builder.AddConnectorUtils();
builder.AddDUI();
builder.AddSingleton(new RevitContext());

// POC: the concrete type can come out if we remove all the reference to it
builder.AddScoped<IConversionContextStack<IRevitDocument, IRevitForgeTypeId>, RevitConversionContextStack>();
builder.ScanAssemblyOfType<RevitUnitUtils>();
//builder.AddDUIView();

builder.AddSingletonInstance<ISyncToThread, SyncToCurrentThread>();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Revit.Plugin;
using Speckle.Connectors.RevitShared.Helpers;
using Speckle.Connectors.Utils;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Core.Logging;
using Speckle.Newtonsoft.Json;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,27 @@
using Speckle.Core.Models;
using Autodesk.Revit.DB;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Converters.RevitShared.Helpers;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Connectors.Utils.Operations;
using Speckle.Core.Logging;
using Speckle.Revit.Api;
using Speckle.Revit.Interfaces;

namespace Speckle.Connectors.Revit.Operations.Send;

public class RevitRootObjectBuilder : IRootObjectBuilder<ElementId>
{
// POC: SendSelection and RevitConversionContextStack should be interfaces, former needs interfaces
private readonly IRootToSpeckleConverter _converter;
private readonly IConversionContextStack<IRevitDocument, IRevitForgeTypeId> _contextStack;
private readonly IRevitConversionContextStack _contextStack;
private readonly Dictionary<string, Collection> _collectionCache;
private readonly Collection _rootObject;
private readonly ISendConversionCache _sendConversionCache;

public RevitRootObjectBuilder(
IRootToSpeckleConverter converter,
IConversionContextStack<IRevitDocument, IRevitForgeTypeId> contextStack,
IRevitConversionContextStack contextStack,
ISendConversionCache sendConversionCache
)
{
Expand All @@ -46,7 +45,7 @@ public RootObjectBuilderResult Build(
CancellationToken ct = default
)
{
var doc = ((DocumentProxy)_contextStack.Current.Document)._Instance;
var doc = _contextStack.Current.Document;

if (doc.IsFamilyDocument)
{
Expand All @@ -57,7 +56,7 @@ public RootObjectBuilderResult Build(

foreach (var id in objects)
{
var el = doc.GetElement(id);
var el = _contextStack.Current.Document.GetElement(id);
if (el != null)
{
revitElements.Add(el);
Expand Down
Loading

0 comments on commit cd39d86

Please sign in to comment.