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

feat(core): add ability to use globs as outputs #10894

Merged
merged 3 commits into from Jul 14, 2022

Conversation

FrozenPandaz
Copy link
Collaborator

@FrozenPandaz FrozenPandaz commented Jun 24, 2022

Current Behavior

Globs cannot be used as outputs.

Performance:
dir

  1. Original command 1s ( 383.186ms is writing to cache)
  2. nothing changed 56ms
  3. copy from cache 458ms (381.593ms is copying files)

Expected Behavior

Globs are able to be used as outputs.

Performance:
dir

  1. Original command 1s (296.584ms is writing to cache)
  2. nothing changed 90ms
  3. copy from cache 464ms (383.27ms is copying files)

glob

  1. Original command 1s (289.817ms is writing to cache)
  2. nothing changed 332ms (239.835ms is copying files)
  3. copy from cache 399ms (212.741ms is copying files)

Related Issue(s)

Fixes #8593

@vercel
Copy link

vercel bot commented Jun 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Jul 14, 2022 at 9:35PM (UTC)

@valerybugakov
Copy link

valerybugakov commented Jul 5, 2022

Hey @FrozenPandaz, I was looking for information about globs usage in the outputs property. This PR seems to close the issue 🎉. Is there anything I can help with to move it forward?

@valerybugakov
Copy link

valerybugakov commented Jul 8, 2022

It would be great to get an idea if external contributions can help to push this feature forward.
Cc @meeroslav, since I see your activity in PRs.

@FrozenPandaz FrozenPandaz force-pushed the glob-outputs branch 3 times, most recently from e4f0a10 to bbfcf6a Compare July 11, 2022 18:22
@FrozenPandaz FrozenPandaz marked this pull request as ready for review July 12, 2022 17:54
@FrozenPandaz
Copy link
Collaborator Author

FrozenPandaz commented Jul 12, 2022

@valerybugakov thank you for finding that issue.

I believe this PR will be merged soon. 😉 🤞

@@ -117,7 +134,9 @@ export class Cache {
await this.options.remoteCache.store(task.hash, this.cachePath);
}

await this.recordOutputsHash(outputs, task.hash);
if (unchangedOptimizationEnabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you will need to remove old outputs in the else branch.

If the number of outputs goes from 4 to 5, you will have old files eft.

@valerybugakov
Copy link

Looking forward to test-driving it on our repo!

@FrozenPandaz FrozenPandaz merged commit 63b74d2 into nrwl:master Jul 14, 2022
@FrozenPandaz FrozenPandaz deleted the glob-outputs branch July 14, 2022 22:31
jean343 added a commit to jean343/nx that referenced this pull request Jul 23, 2022
commit 1a900d4
Author: Jason Jean <jasonjean1993@gmail.com>
Date:   Fri Jul 22 19:25:38 2022 -0400

    fix(misc): show help when no command is passed (nrwl#11269)

commit 7b6d765
Author: Júlio César <julio@julioc.me>
Date:   Fri Jul 22 18:24:36 2022 -0300

    docs(nx-plugin): improve targets inferece example (nrwl#10839)

    Add example `projectFilePatterns` export, which is required for a minimal runnable example. Also fixes a typo in code.

commit 764e5b5
Author: Phillip Barta <barta.phillip@gmail.com>
Date:   Fri Jul 22 23:04:13 2022 +0200

    feat(express): update express to 14.18.1 (nrwl#11190)

commit 89e0fef
Author: Doni Rubiagatra <rubiagatra@gmail.com>
Date:   Sat Jul 23 03:56:14 2022 +0700

    docs(misc): fix indentation in bitbucket pipeline (nrwl#11225)

commit 13354e5
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Fri Jul 22 16:53:45 2022 -0400

    docs(nxdev): add empty state for schema lists (nrwl#11268)

commit f285446
Author: Ali Yusuf <17704100+AliYusuf95@users.noreply.github.com>
Date:   Fri Jul 22 23:16:33 2022 +0300

    fix(core): use proper package manager when installing package for migration (nrwl#11213)

commit 67f6ed9
Author: Amir H. Khanjani <72540492+ahkhanjani@users.noreply.github.com>
Date:   Sat Jul 23 00:43:47 2022 +0430

    cleanup(core): removed unused imports (nrwl#11175)

    * removed unused imports (yargs & RawNxArgs)

    * cleanup(core): removed unused imports

    removed yargs and RawNxArgs from imports

commit dbdb482
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Fri Jul 22 16:01:02 2022 -0400

    docs(nxdev): hide github link on mobile (nrwl#11266)

commit aa575fc
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Fri Jul 22 15:56:22 2022 -0400

    docs(nxdev): add github example callout (nrwl#11265)

commit 3d6d69e
Author: Rares Matei <matei.rar@gmail.com>
Date:   Fri Jul 22 20:42:17 2022 +0100

    docs(nx-cloud): update private cloud release notes (nrwl#11264)

    * docs(nx-cloud): update private cloud release notes

    * docs(nx-cloud): fix formatting

commit 6f2d524
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Fri Jul 22 20:28:45 2022 +0100

    cleanup(misc): replace usage of rxjs-for-await (nrwl#11182)

commit 00ef4c7
Author: Jason Jean <jasonjean1993@gmail.com>
Date:   Fri Jul 22 14:53:17 2022 -0400

    fix(misc): make __unparsed__ not required and add smart provider in adapter (nrwl#11262)

commit 7d3b662
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Fri Jul 22 13:57:49 2022 -0400

    docs(nxdev): add icon to github link button (nrwl#11261)

commit 2f0cd86
Author: Stefan van de Vooren <svandevooren@gmail.com>
Date:   Fri Jul 22 18:39:35 2022 +0200

    fix(core): improve performance of enforce-module-boundaries linting rule on Windows (nrwl#11251)

    Co-authored-by: fu_cdp_jenkins-git_houston <online.darwin@rabobank.nl>

commit 712e6dd
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Fri Jul 22 17:02:13 2022 +0100

    cleanup(angular): move all inline version numbers to versions.ts (nrwl#11258)

commit d372be0
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Fri Jul 22 16:07:03 2022 +0100

    feat(angular): deprecate generating e2e tests with protractor (nrwl#11254)

commit 8075cb9
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Fri Jul 22 11:06:22 2022 -0400

    chore(nextjs): remove outdir from Next.js config since it is no longer needed (nrwl#11257)

commit 46ad8c3
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Fri Jul 22 16:01:24 2022 +0100

    feat(angular): support angular v14.1.0 (nrwl#11155)

commit ea3fe2e
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Fri Jul 22 15:24:11 2022 +0100

    feat(angular): add spa option to file-server executor to support reloading client-side routes (nrwl#11252)

commit dc6c531
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Fri Jul 22 10:21:18 2022 -0400

    docs(nxdev): update nxconf dates (nrwl#11255)

commit 8e6a66c
Author: Juri <juri.strumpflohner@gmail.com>
Date:   Fri Jul 22 13:50:43 2022 +0200

    fix(linter): correctly fix absolute imports across package boundaries

commit 2fa7578
Author: Katerina Skroumpelou <mandarini@users.noreply.github.com>
Date:   Fri Jul 22 16:07:54 2022 +0300

    docs(storybook): extra topic notes to callouts update (nrwl#11249)

commit 0b977b7
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 21 17:31:27 2022 -0400

    docs(nxdev): update conference info (nrwl#11245)

commit ca127d8
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 21 14:25:03 2022 -0400

    docs(nxdev): convert notes into callouts (nrwl#11244)

commit e1a61ca
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 21 14:19:59 2022 -0400

    docs(nxdev): add references page (nrwl#11061)

commit 68a2a11
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 21 13:54:28 2022 -0400

    docs(nxdev): add security headers (nrwl#11240)

commit b89e321
Author: Emily Xiong <xiongemi@gmail.com>
Date:   Thu Jul 21 12:37:52 2022 -0400

    fix(core): print out configuration for run-many logging (nrwl#11228)

commit 8c7b76e
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Wed Jul 20 18:09:33 2022 -0400

    docs(nxdev): convert notes into callouts (nrwl#11232)

commit c117ad5
Author: Laforge Thomas <30832608+tomalaforge@users.noreply.github.com>
Date:   Wed Jul 20 23:57:51 2022 +0200

    fix(linter): update typescript eslint dependency (nrwl#11112)

    Co-authored-by: Miroslav Jonas <missing.manual@gmail.com>

commit 5f097b9
Author: Miroslav Jonaš <meeroslav@users.noreply.github.com>
Date:   Wed Jul 20 22:48:56 2022 +0200

    feat(core): improve graph utils matrix generation (nrwl#11226)

commit 8f628cd
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Wed Jul 20 16:36:11 2022 -0400

    docs(nx-cloud): add nx-cloud.env info (nrwl#11231)

commit 41693f9
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Wed Jul 20 17:41:18 2022 +0100

    fix(angular): update package watch version on secondary entrypoint changes when building libraries in watch mode (nrwl#11230)

commit 3a63eea
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Wed Jul 20 11:56:57 2022 -0400

    chore(core): remove checks for built dependencies in executors since dependsOn guarantees that they are built (nrwl#11227)

commit 0cd8d8c
Author: Caleb Ukle <caleb@nrwl.io>
Date:   Tue Jul 19 17:28:02 2022 -0500

    fix(testing): update exports for .ts plugin files (nrwl#11200)

commit 8173887
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Tue Jul 19 15:07:37 2022 -0400

    feat(react): add tailwind setup generator (nrwl#11214)

    LGTM!

commit 01f7376
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Tue Jul 19 17:59:37 2022 +0100

    cleanup(misc): consolidate tslib version in generated projects (nrwl#11185)

commit fc16d62
Author: Phillip Barta <barta.phillip@gmail.com>
Date:   Tue Jul 19 18:58:23 2022 +0200

    cleanup(devkit): use `Mode` type from `fs` for `Tree` permissions (nrwl#11188)

commit 9436a96
Author: Juri <juri.strumpflohner@gmail.com>
Date:   Tue Jul 19 16:26:56 2022 +0200

    fix(nextjs): adjust generator reference in Next startup page component

commit 10316d9
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Tue Jul 19 09:41:50 2022 -0400

    docs(react): update tailwind guide (nrwl#11208)

commit c3bd976
Author: Juri Strumpflohner <juri.strumpflohner@gmail.com>
Date:   Mon Jul 18 13:32:59 2022 -0700

    docs(core): link to webpack MF build speedup

commit aed7b5e
Author: Jason Jean <jasonjean1993@gmail.com>
Date:   Mon Jul 18 18:52:48 2022 -0400

    docs(angular): fix video for step 4 of tutorial (nrwl#11198)

commit 363dd6b
Author: Jason Jean <jasonjean1993@gmail.com>
Date:   Mon Jul 18 17:42:22 2022 -0400

    chore(repo): update nx to 14.5.0-beta.2 (nrwl#11196)

commit 38a2d95
Author: Emily Xiong <xiongemi@gmail.com>
Date:   Mon Jul 18 15:39:25 2022 -0400

    feat(detox): add detox config for expo apps (nrwl#11104)

commit d657f91
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Mon Jul 18 15:23:30 2022 -0400

    feat(web): upgrade webpack plugin versions (nrwl#11191)

commit ee3eb3d
Author: Victor Savkin <mail@vsavkin.com>
Date:   Mon Jul 18 13:41:41 2022 -0400

    chore(nxdev): update cloud docs not to mention mode

commit b7a1cd3
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Mon Jul 18 18:02:11 2022 +0100

    fix(angular): add @angular/localize to list of default packages to be eagerly loaded in mf apps (nrwl#11189)

commit 6866122
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Mon Jul 18 15:41:17 2022 +0100

    feat(angular): deprecate syntax option from the ngrx generator (nrwl#11184)

commit edc9ce1
Author: Mads Thines <madsthines@gmail.com>
Date:   Mon Jul 18 13:50:10 2022 +0200

    fix(storybook): adjusted `STORYBOOK_` (nrwl#11171)

    Corrected the `STORYBOOK_` RegExp to match documentation
    https://storybook.js.org/docs/react/configure/environment-variable

commit cc6c2f9
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Mon Jul 18 11:40:20 2022 +0100

    feat(angular): deprecate DataPersistence class in favor of data persistence operators (nrwl#11183)

commit bd9b33e
Author: Helton <helton@heltonsouza.com.br>
Date:   Fri Jul 15 19:17:35 2022 -0300

    docs(nxdev): fix link break in the docs (nrwl#11148)

    fix the link from generator/modifying-files pages to /generators/composing-generators

commit f8104d9
Author: null <wu38607@live.com>
Date:   Sat Jul 16 05:43:42 2022 +0800

    fix(core): outputs in nx.json targetDefaults is not work (nrwl#11157)

    * fix(core): outputs in nx.json targetDefaults is not work

    ISSUES CLOSED: nrwl#11141

    * fix(core): handle when targets is undefined

    Co-authored-by: Jason Jean <jasonjean1993@gmail.com>

commit 96e84ee
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Fri Jul 15 16:46:41 2022 -0400

    fix(misc): add dotenv as dependencies for plugins that import it (nrwl#11167)

commit 57a6ebc
Author: Ihor <kopach@users.noreply.github.com>
Date:   Fri Jul 15 20:46:38 2022 +0200

    fix(react): fix typo in testing-library migrations

commit e3d5c53
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Fri Jul 15 14:10:07 2022 -0400

    fix(nextjs): set development outputPath to a different one from production build (nrwl#11169)

    - Avoids conflict with cached output
    - Fixes nrwl#10312

commit 2af1a14
Author: Rares Matei <matei.rar@gmail.com>
Date:   Fri Jul 15 18:46:14 2022 +0100

    docs(nx-cloud): update release notes (nrwl#11159)

commit 39cc96a
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Fri Jul 15 13:42:08 2022 -0400

    feat(react): update react package versions (nrwl#11168)

commit 63b74d2
Author: Jason Jean <jasonjean1993@gmail.com>
Date:   Thu Jul 14 18:31:12 2022 -0400

    feat(core): add ability to use globs as outputs (nrwl#10894)

    * feat(core): add ability to use globs as outputs

    * fix(repo): adjust the way outputs are tracked

    * docs(core): improve outputs documentation

commit 61e1931
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 14 17:57:22 2022 -0400

    docs(nxdev): remove gray-matter dependency (nrwl#11150)

commit df0f334
Author: Caleb Ukle <caleb@nrwl.io>
Date:   Thu Jul 14 16:07:21 2022 -0500

    chore(testing): remove console.log in migration util (nrwl#11149)

commit 8519627
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 14 14:40:52 2022 -0400

    docs(nxdev): internal link checker now supports indexes (nrwl#11147)

commit 421b4d9
Author: Chau Tran <nartc7789@gmail.com>
Date:   Thu Jul 14 22:55:30 2022 +0700

    feat(nest): upgrade nest to v9 (nrwl#11120)

commit 49f0170
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 14 10:56:55 2022 -0400

    docs(nxdev): upgrade next-sitemap dependency (nrwl#11142)

commit de41142
Author: Victor Savkin <mail@vsavkin.com>
Date:   Thu Jul 14 09:03:39 2022 -0400

    chore(repo): connect to staging nx cloud

commit 04cb186
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Thu Jul 14 10:17:26 2022 -0400

    docs(nxdev): documentation link checker (nrwl#11140)

commit 943d4ba
Author: Katerina Skroumpelou <mandarini@users.noreply.github.com>
Date:   Thu Jul 14 13:25:14 2022 +0300

    fix(storybook): include polyfills in Storybook tsconfig for ngapps (nrwl#11136)

commit b05f9e0
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Wed Jul 13 19:35:15 2022 -0400

    docs(nxdev): fix 404 links (nrwl#11134)

commit c075e69
Author: Emily Xiong <xiongemi@gmail.com>
Date:   Wed Jul 13 15:50:15 2022 -0400

    feat(react-native): upgrade metro to 0.71.3 (nrwl#11105)

commit 2163c54
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Wed Jul 13 20:32:03 2022 +0100

    fix(react): do not set a module federation remote project as the default project (nrwl#11128)

commit c088dd7
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Wed Jul 13 14:31:21 2022 -0400

    docs(nxdev): add press kit link in footer (nrwl#11133)

commit b042b80
Author: Jack Hsu <jack.hsu@gmail.com>
Date:   Wed Jul 13 14:30:12 2022 -0400

    feat(next): update next.js versions (nrwl#11115)

commit f08d4ab
Author: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date:   Wed Jul 13 13:01:02 2022 -0400

    docs(nxdev): move content from cli into nx (nrwl#11085)

commit 9933d91
Author: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Date:   Wed Jul 13 17:26:28 2022 +0100

    fix(core): handle specifying a prerelease version without a package when migrating (nrwl#11129)
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow globs pattern in target outputs
3 participants