-
Notifications
You must be signed in to change notification settings - Fork 15
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
refactor(setup): abstract platform deps into json config #120
base: main
Are you sure you want to change the base?
Conversation
Thanks for working on this. I'm not very familiar with the PlatformIO manifest. I think I could learn to work with what you show in the two files. A few questions:
|
This is inspired by their manifest. From the PlatformIO documentation, I couldn't tell what their specific prefixes and format translated to in their tooling. This is very focused on the types of dependencies required by Moddable that can be automated by xs-dev.
Yes. I have a rough idea of how to consume the manifest files and run the tasks associated with each dependency. This has some real potential to reduce the amount of overall code since the details are abstracted into general tasks and these manifests.
Yes, I was considering these files could be stored within the Moddable codebase and tied to each release, possibly within the |
Thanks for the details. That all makes good sense. The code simplifications for xs-dev – basically moving to something that is more data driven - should make it easier to integrate new platforms and tools. Putting the platform dependencies manifests in build/devices should work for devices. The devices directory doesn't current have sub-directories for macOS, Windows, Linux, and wasm targets though. I guess these's no harm in adding them though to be consistent for this feature. |
For wasm, I agree it should be treated like another device target. The OS targets are interesting because they are part of the Moddable SDK install and should use the pre-built tooling by default, so I had not thought about abstracting their setup into manifests yet. But there are still expected dependencies on each OS even for targeting the simulator, so those could still be defined by a As an aside, we haven't updated the Windows setup process to take advantage of the releases yet. |
I see your point.
Maybe these are such special cases (Xcode command line tools) that there's not much point in managing it through to the platform manifest? |
Linux and Windows still have some dependencies, although Linux is still for compiling the tooling when not using pre-built releases I believe. I'm fine keeping the SDK setup separate from the platform manifest scheme for now. |
Fixes #4 and follow up to #117
While I originally thought the SBOM format might be a standardize way to solve this, it didn't appear to satisfy my expected requirements. Instead, I looked to the PlatformIO project for inspiration. This lead me to their
platform.json
manifest file to define platform definitions for integrating with the PlatformIO tooling.In this PR, I've adapted the
platform.json
idea into a fairly simple schema with a map of dependencies of various types ("repo", "package", "download") and other fields ("os", "source", "installer"). This should be able to cover the basic requirements for each platform.TODO:
/cc: @phoddie @andycarle