-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to monorepo #64
Conversation
# Conflicts: # packages/cli/src/main.ts
A summary of the current state (with some overlap from the previous post, but with some additional detail):
Some packages (mainly The orthogonal questions mentioned in the previous comment will be addressed next, most importantly: How to set up the specs and jasmine config and scripts in a reasonable way. Any feedback is appreciated. |
Updated from current state of 'main' branch (1946693)
Further steps with attempts to get the tests running are in https://github.com/CesiumGS/3d-tiles-tools/tree/convert-to-monorepo-testing It is not possible to create a "modern monorepo with TypeScript" and Jasmine tests. There are other test frameworks, and we could start converting hundreds of tests to a new framework, but from what I've read and experienced in the last week, the chance that any of them will be working as intended is zero. An alternative approach would be to extract the suggested packages into standalone GitHub repositories and publishing them as individual packages. But for now, we'll have to treat the 3D Tiles Tools purely as a command-line application, without an API, and without a separation into useful building blocks. |
Giving up sometimes is harder than not giving up.
I still stand behind that, and would like to see a counterexample. The last updates here at least got the compilation and tests running again - with caveats and quirks. Further details will be added here (and in |
They all refer to a "root" directory with the data, and resolving paths depends on where exactly the npm run test command was issued. Workaround with jasmine spec helpers and environment variable.
…-merge # Conflicts: # etc/3d-tiles-tools.api.md # packages/metadata/specs/metadata/PropertyTableModelsSpecialValuesSpec.ts # packages/metadata/src/metadata/binary/BinaryMetadata.ts # packages/tools/specs/contentProcessing/GltfTransformSpec.ts # packages/tools/src/tilesetProcessing/ContentBoundingVolumes.ts # packages/tools/src/tilesetProcessing/OrientedBoundingBoxes.ts # packages/tools/src/tilesetProcessing/external/README.md # packages/tools/src/tilesetProcessing/external/dito.ts # src/metadata/MetadataUtilities.ts # src/metadata/binary/BinaryPropertyTable.ts # src/metadata/binary/BooleanPropertyModel.ts # src/tilesetProcessing/BoundingVolumes.ts # src/tilesetProcessing/TilesetJsonCreator.ts
Right now, this shows many conflicting files. The reason is, as a rough summary:
There is no way to merge that automatically. The changes from All this felt quirky, and maybe someone with better Git foo could have found a "simpler" way, but this seemed to be the only way to avoid losing changes from |
Merge main branch into monorepo conversion
It was ONLY used for the logger, which is now replaced with a simple log callback.
If somebody thinks that there is a way to solve this without the frowned-upon "noImplicitAny": false, then: Pull requests welcome.
…tiles-tools into convert-to-monorepo
The last updates here:
|
Converting the monorepo back to CommonJS
Considering the extended scope and functionality that has been added to the 3D Tiles Tools after its revival, it probably makes sense to split it into multiple packages, to improve maintainability and dependency management.
(I say 'improve', hesitatingly. It does cause efforts on the side of the maintainers. But I think that it is better for consumers to have smaller dependendencies, and there definitely are advantages in having small(er), potentially reusable building blocks, in order to decide what exactly should be exported from each package)
The IMPLEMENTATION.md summarizes the current directory structure of the 3D Tiles Tools. The intention behind this structure is ROUGHLY that each directory constitues something that could be considered to be a "package". But still, the 3D Tiles Tools have been a single package until now.
This PR converts the repository into a monorepo with several packages. I considered two approaches:
I took the second approach, meaning that there currently is a package called
all
that contains everything that has not been split into smaller packages yet. The first packages to be carved out are those that don't have ("internal") dependencies.At the time of writing this, the packages are:
structure
: The plain TypeScript classes that reflect the JSON types of 3D Tiles (largely auto-generated from the schema)gltf-extensions
: The implementations ofEXT_mesh_features
,EXT_instance_features
, andEXT_structural_metadata
(based on glTF-Transform)ktx
- The utility classes that are wrapped around the BinomialLLC Basis Encoder WASM moduleall
- The part that is not handled yet (and has all other packages as dependency, except forcli
)cli
- The command line interface. This only consists of themain.ts/ToolsMain.ts
, and hasall
as its dependencyThe rough structure for the next packages could be
base
, with the basic IO, spatial, maybe the 'content type detection', and utility classestilesets
with stuff like the traversal and basic tileset processing infrastructure,metadata
, focussing on the part that can be considered to be the implementation of the 3D Tiles Metadata spec (including binary metadata)tileContent
, with the classes for B3DM/PNTS/etcFor the final decisions here, the dependencies have to be sorted out more clearly, and some judgement calls will have to be made about what makes a package "sensible" and "coherent".
There are some orthogonal questions that still have to be answered. These are roughly on the level of
package.json
?I think that only the top-level
package.json
will contain the stuff for linting or coverage. The package-package.json
s usually contain only thebuild
scriptThe specs are currently still in the top-level
specs
directory (not handled yet, cannot be run). They will have to be moved to the respective<packageName>
/specs
directory. (But I'm not sure whether it should be possible to run them for each package, or whether they are also (only) triggered from the top-levelpackage.json
)Any feedback is appreciated.