Open GytisCepk opened 1 week ago
Please add to your TODO list: Don't break display-test-app. See usage here.
lgtm;
@markschlosseratbentley please review changes to DTA
@MarcNeely FYI
lgtm; @markschlosseratbentley please review changes to DTA
@MarcNeely FYI
@aruniverse I did some very basic testing (successfully opened an iModel in a DTA built off this branch) and it works. @MarcNeely may have some more thorough testing he can do.
This pull request is now in conflicts. Could you fix it @GytisCepk? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
I did some very basic testing (successfully opened an iModel in a DTA built off this branch) and it works.
Did you confirm you can edit an iModel?
I did some very basic testing (successfully opened an iModel in a DTA built off this branch) and it works.
Did you confirm you can edit an iModel?
I did not confirm this.
EDIT: fyi @pmconne I have now confirmed that I can successfully edit an iModel using this branch. I placed a bunch of line strings in an iModel and those lines persisted.
I used Electron DTA.
Public API changes
SnapshotConnection.openRemote
API.SnapshotConnection.openFile
only available in IPC apps.Motivation
SnapshotConnection
relies onSnapshotIModelRpcInterface
for it's communication with the backend. With deprecation and eventual replacement of RPC, all RPC interfaces owned by core need to reviewed and rewritten as needed. While some of the other RPC interfaces (e.g.IModelReadRpcInterface
) will need to be converted to the new architecture, I believe,SnapshotIModelRpcInterface
can be moved to IPC as it doesn't make sense to have Web implementation for it.Details
SnapshotConnection
/SnapshotIModelRpcInterface
has two main methods:openFile(filePath: string, ...)
- opening iModel using file path only makes sense if backend is on the same machine. This is the case in Electron and mobile in which IPC can be used. For that reason newIpcApp.appFunctionIpc.openSnapshot
was added.openRemote(key: string, ...)
- as far as I can tell, this was intended to be used in Web Viewer. Web Viewer and other iTwin.js web applications should be usingCheckpointConnection.openRemote(...)
. Since GPB doesn't have implementation registered forSnapshotIModelRpcInterface
, this is not even usable in the web without custom backend.TODO
SnapshotConnection.openFile
to work with IPC and not RPC could be considered a breaking change as it's excludes web applications from calling it, it's highly unlikely we're going to break anyone since someone needs to have a custom backend set up to useopenFile
in the web application.SnapshotConnection.openFile
in full-stack-tests/core as we will want to keep running those tests in Chrome.TestSnapshotConnection
class which opensiModelDb
through custom .SnapshotConnection.openFile
in full-stack-tests/presentation or support IPC there.TestIModelConnection
class which opensiModelDb
directly.TestSnapshotConnection
similar to the one in core full-stack-tests.