Skip to content

ci: link lockfile#3918

Merged
Saadnajmi merged 3 commits into
microsoft:mainfrom
Saadnajmi:lint-lockfile
Jun 25, 2025
Merged

ci: link lockfile#3918
Saadnajmi merged 3 commits into
microsoft:mainfrom
Saadnajmi:lint-lockfile

Conversation

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Similar to microsoft/react-native-test-app#2496 , run @rnx-kit/lint-lockfile on CI.

While touching this, I realized we were running align-deps (a repo-wide task run once) as part of depcheck (a task we run with lage on every leaf project). I don't like that, so I separated the two so that repo-wide single tasks (align-deps and lint-lockfile) are not run as part of lage and run explicitly as separate steps. I would prefer them to run with Lage, but I don't know how to configure the pipeline for these repo-wide single tasks.

Verification

CI should pass.

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

@Saadnajmi Saadnajmi requested a review from tido64 June 24, 2025 22:06
@Saadnajmi Saadnajmi requested a review from a team as a code owner June 24, 2025 22:06
Comment thread yarn.lock Outdated
@Saadnajmi
Copy link
Copy Markdown
Collaborator Author

Saadnajmi commented Jun 25, 2025

I looked into enabling root-level targets with lage, and I need to do a couple of things:

  1. Add the root as a workspace because of Cannot reference root package tasks? lage#862 (Feels like lage should do this automatically?)
  2. Update our lage config so we have something like ['build-tools']: ['^build-tools', '@fluentui-react-native/root#align-deps', '@fluentui-react-native/root#link-lockfile'],
  3. Add inputs to both tasks so they can be used with a cache, because of https://github.com/microsoft/lage/blob/681710b4af96431c5245237ff7c9a50e56ce2fb9/packages/hasher/src/TargetHasher.ts#L173
  • For lint-lock file, the input is just the lock file.
  • for align-deps, it would be every package.json.. so we will need to glob that?

I think I'd be willing to do those 3, but feels like much?

@tido64
Copy link
Copy Markdown
Member

tido64 commented Jun 25, 2025

  1. Add the root as a workspace because of Cannot reference root package tasks? lage#862 (Feels like lage should do this automatically?)

This is expected, even if a bit unintuitive. I think it's the same with other build orchestrators, at least with Nx.

  1. Update our lage config so we have something like ['build-tools']: ['^build-tools', '@fluentui-react-native/root#align-deps', '@fluentui-react-native/root#link-lockfile'],

Wouldn't this be sufficient if you add root as a workspace? ['build-tools']: ['^build-tools', 'align-deps', 'link-lockfile'],

  1. Add inputs to both tasks so they can be used with a cache, because of https://github.com/microsoft/lage/blob/681710b4af96431c5245237ff7c9a50e56ce2fb9/packages/hasher/src/TargetHasher.ts#L173

If build-tools is cached, its tasks are no longer run. I don't think we need to make any changes for this.

@Saadnajmi
Copy link
Copy Markdown
Collaborator Author

  1. Add the root as a workspace because of Cannot reference root package tasks? lage#862 (Feels like lage should do this automatically?)

This is expected, even if a bit unintuitive. I think it's the same with other build orchestrators, at least with Nx.

  1. Update our lage config so we have something like ['build-tools']: ['^build-tools', '@fluentui-react-native/root#align-deps', '@fluentui-react-native/root#link-lockfile'],

Wouldn't this be sufficient if you add root as a workspace? ['build-tools']: ['^build-tools', 'align-deps', 'link-lockfile'],

  1. Add inputs to both tasks so they can be used with a cache, because of https://github.com/microsoft/lage/blob/681710b4af96431c5245237ff7c9a50e56ce2fb9/packages/hasher/src/TargetHasher.ts#L173

If build-tools is cached, its tasks are no longer run. I don't think we need to make any changes for this.

Once you add root as a workspace, any task run at root (including "build") must have inputs. I played around with it and git it half working but the build fails. Rather than debug, I think I'll just merge this change as is.

Comment thread package.json
@Saadnajmi Saadnajmi merged commit 622840d into microsoft:main Jun 25, 2025
11 checks passed
@Saadnajmi Saadnajmi deleted the lint-lockfile branch June 25, 2025 22:56
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.

3 participants