Skip to content

[eas-cli] Validate legacy command/path local functions referenced from workflows - #4098

Draft
sswrk wants to merge 1 commit into
szymonswierk/eng-25402-build-tools-load-legacy-functionsfrom
szymonswierk/eng-25402-eas-cli-validate-legacy-functions
Draft

[eas-cli] Validate legacy command/path local functions referenced from workflows#4098
sswrk wants to merge 1 commit into
szymonswierk/eng-25402-build-tools-load-legacy-functionsfrom
szymonswierk/eng-25402-eas-cli-validate-legacy-functions

Conversation

@sswrk

@sswrk sswrk commented Jul 27, 2026

Copy link
Copy Markdown
Member

Why

eas workflow:validate and eas workflow:create check referenced local functions before anything is submitted, so mistakes surface on the developer's machine instead of failing the build later. Completes the stack that lets custom build functions from .eas/build configs move into .eas/functions (#4095, #4096, #4097).

How

Validates function.yml files with the widened LocalFunctionConfigZ, so both shapes are accepted and a file mixing them is rejected with a readable error. For a path function, checks that the module directory and its package.json exist locally, resolving the path with the same shared helper the build runner uses and naming both the literal path: value and the resolved location in the error.

Test Plan

cd packages/eas-cli && yarn test src/commandUtils/workflow/__tests__/compositeFunctions-test.ts

Validation tests: a command function and a path function with an existing module pass; a missing module directory, a module without package.json and a config mixing both shapes each fail with a readable error.

Also smoke-tested end to end against a scratch project: validateWorkflowLocalCompositeFunctionsAsync accepted workflows calling a command function and a path function, and rejected a path function whose module directory was missing.

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

ENG-25402

sswrk commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch from 76ac6a7 to c1e1802 Compare July 27, 2026 15:02
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch from 34f9038 to 6ce77e0 Compare July 27, 2026 15:02
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.34%. Comparing base (548b648) to head (e34b99c).

Additional details and impacted files
@@                                     Coverage Diff                                      @@
##           szymonswierk/eng-25402-build-tools-load-legacy-functions    #4098      +/-   ##
============================================================================================
+ Coverage                                                     62.33%   62.34%   +0.02%     
============================================================================================
  Files                                                           996      996              
  Lines                                                         44881    44894      +13     
  Branches                                                       9443     9446       +3     
============================================================================================
+ Hits                                                          27973    27986      +13     
  Misses                                                        15462    15462              
  Partials                                                       1446     1446              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch from 6ce77e0 to c468e34 Compare July 28, 2026 09:04
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch 2 times, most recently from 71cf625 to a0450ff Compare July 28, 2026 12:58
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch 2 times, most recently from d2e8524 to 5554d33 Compare July 28, 2026 13:11
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch from a0450ff to c3d3b6d Compare July 28, 2026 13:11
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch from 5554d33 to 76e0f68 Compare July 28, 2026 15:30
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch 2 times, most recently from 7b0c93a to b053726 Compare July 29, 2026 09:01
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch from 2da65a9 to d1cc5f1 Compare July 29, 2026 09:29
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch from b053726 to b91cd16 Compare July 29, 2026 09:30
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-eas-cli-validate-legacy-functions branch from b91cd16 to e34b99c Compare July 29, 2026 13:40
@sswrk
sswrk force-pushed the szymonswierk/eng-25402-build-tools-load-legacy-functions branch from d1cc5f1 to 548b648 Compare July 29, 2026 13:40
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant