iTwin / imodel-transformer

API for exporting an iModel's parts and also importing them into another iModel
MIT License
3 stars 2 forks source link

Evaluate / List all places we use nativeDb or platform and any other 'deprecated' APIs. #196

Open nick4598 opened 2 months ago

nick4598 commented 2 months ago

This will have implications when it comes time to consume itwinjs 5.0. NativeDb will no longer be accessible at all due to the private symbol approach. We need public API replacements for everything we currently MUST have from NativeDb in the transformer.

We can consider getting rid of some if we deem them no longer necessary, but we definitely can't get rid of them all. Another alternate approach is to somehow give this repo special privileges, but it seems impossible with the private symbol approach. I think this repo is one of the few that was considered acceptable to use internal APIs? But I may be misremembering that. I think its a moot point since itwinjs-core is moving in the direction of private symbols.

Failing PR run that lists all the ones currently in imodel-transformer This doesn't mention all the other packages. ctrl + f for IModelHost.platform and nativeDb to find the rest.

relatedPR that disabled all them for now

LIST GOES HERE:

### Internal Usage
- [ ] ~~nativeDb.extractChangedInstanceIdsFromChangeSets~~
- [ ] ~~nativeDb.schemaToXmlString~~
- [ ] ~~IModelHost.platform.RevisionUtility.recompressRevision~~
- [ ] ~~IModelHost.platform.RevisionUtility.disassembleRevision~~
- [ ] ~~IModelHost.platform.RevisionUtility.assembleRevision~~
- [ ] ~~IModelHost.platform.RevisionUtility.normalizeLzmaParams~~
- [ ] ~~IModelHost.platform.RevisionUtility.computeStatistics~~
- [ ] ~~IModelHost.platform.RevisionUtility.getUncompressSize~~
### Need of @preapproved
- [ ] nativeDb.setITwinId
- [ ] nativeDb.deleteAllTxns
- [ ] nativeDb.openIModel
- [ ] nativeDb.resetBriefcaseId
- [ ] nativeDb.saveLocalValue
- [ ] nativeDb.saveChanges
- [ ] nativeDb.closeFile
- [ ] nativeDb.getChangeTrackingMemoryUsed
- [ ] nativeDb.completeCreateChangeset
- [ ] nativeDb.startCreateChangeset
- [ ] nativeDb.applyChangeset
- [ ] nativeDb.startProfiler
- [ ] nativeDb.stopProfiler
- [ ] IModelHost.platform.DgnDb
### Public
- [ ] nativeDb.exportSchema
- [ ] nativeDb.inlineGeometryPartReferences
- [ ] nativeDb.simplifyElementGeometry
- [ ] nativeDb.insertElement
- [ ] nativeDb.getLastError
derbynn commented 2 months ago

MUST HAVE REPLACEMENT:

MIGHT NEED REPLACEMENT:

MIGHT BE ABLE TO REMOVE:

Yet to be sorted:

*Denotes that the function is not being used exclusively by tests

aruniverse commented 2 months ago

fyi @pmconne @wgoehrig to keep you guys in the loop

pmconne commented 2 months ago

Would it be possible to provide a list of the APIs you are using that currently do not have an alternative public API, with link(s) to your usage of each?

nick4598 commented 2 months ago

Thanks for the suggestion, we will work on gathering that information

nick4598 commented 2 months ago

Daniel has updated the list with links to their usage. I also tried to give a rough categorization of each one, "must have replacement", "might need replacement".