Skip to content
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

[New Feature] Extending build-tool integration with subcommands, central delivered tools and adding to Dependencies.toml #42155

Closed
gayaldassanayake opened this issue Feb 14, 2024 · 2 comments · Fixed by #42251
Assignees
Labels
Area/CLI-BuildTools Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/NewFeature

Comments

@gayaldassanayake
Copy link
Contributor

gayaldassanayake commented Feb 14, 2024

Description

Currently, Ballerina provides bal tool, a way for developers to extend the CLI functionalities by introducing new commands. These tools/ commands are shipped as packages in Ballerina Central and are managed by the inbuilt bal tool command.

With update 9, we are also allowing tools to be integrated with the build command. They will run as a pre-build task. (Design doc - https://docs.google.com/document/d/1XsZK3UlqXv4TLEgRKVc0UBRRilLTmLZ1heDTmIRuylE/edit?usp=sharing).

Describe your problem(s)

  1. However, the build integrated tools need to be packed in the distribution(bre/lib) to be used. There is no way to externally publish and use the build integrated tools.
  2. We need to support integration of subcommand of tools (eg:- health.fhir) with build.
  3. For predictable builds, we need to lock tool versions in Dependencies.toml

Describe your solution(s)

Use the existing strategy of delivering bal tools to distribute the tools integrated with build.
Design doc - https://docs.google.com/document/d/1XsZK3UlqXv4TLEgRKVc0UBRRilLTmLZ1heDTmIRuylE/edit#heading=h.3odx7sx4desy

Related area

-> Compilation

Related issue(s) (optional)

#41415

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

Related issues

@gayaldassanayake gayaldassanayake self-assigned this Feb 14, 2024
@gayaldassanayake gayaldassanayake changed the title Publishing build integrated tools to ballerina central Delivering tools integrated to build via Ballerina Central Feb 14, 2024
@gayaldassanayake gayaldassanayake added Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Area/CLI-BuildTools labels Feb 14, 2024
@gayaldassanayake gayaldassanayake changed the title Delivering tools integrated to build via Ballerina Central [Improvement] Delivering tools integrated to build via Ballerina Central Feb 15, 2024
@gayaldassanayake
Copy link
Contributor Author

gayaldassanayake commented Feb 29, 2024

Following are the tasks that have to be completed under this feature.

Phase 1

  • Picking tools from a URL class loader
  • Dependency version resolution
  • Automatically pulling tools
  • Restrict tools from having a DOT in id
    • In pack
    • In push
    • Central
    • Tool Loading
  • Recording in Dependencies.toml
  • Supporting subcommands
  • Test tool resolution endpoint (Blocked on endpoint implementation)
  • Change the getName() return type to String[]
  • Introduce offline resolution
  • Introduce a print API for the developers
  • Introduce @ToolConfig annotation
  • Testing
    • Manual testing of all scenarios
    • Lang tests
    • Distribution tests
    • Full build pipeline
    • Peer testing
    • VSCode functionality testing (manually)
  • Documentation
    • Update the developer guide
    • Website documentation
    • Release notes

Phase 2

  • Minimum compatibility version
  • Local repo support

@gayaldassanayake gayaldassanayake changed the title [Improvement] Delivering tools integrated to build via Ballerina Central [New Feature] Extending build-tool integration with subcommands, central delivered tools and adding to Dependencies.toml Feb 29, 2024
@gayaldassanayake
Copy link
Contributor Author

gayaldassanayake commented Mar 21, 2024

The initial PR has been merged. The remaining tasks are,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CLI-BuildTools Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/NewFeature
Projects
None yet
2 participants