moonrepo / moon

A build system and monorepo management tool for the web ecosystem, written in Rust.
https://moonrepo.dev/moon
MIT License
2.81k stars 154 forks source link

[bug] Internal tasks can be run with `moon run` #1582

Closed doron-cohen closed 1 month ago

doron-cohen commented 1 month ago

Describe the bug

I created a task with options.internal: true but I can still see it in moon query tasks and can run it with moon run

Steps to reproduce

  1. Create an internal task
  2. Use moon query tasks and moon run to see and run it

Expected behavior

Per documentation it shouldn't be seen

Screenshots

Screenshot 2024-07-23 at 13 58 07 Screenshot 2024-07-23 at 13 58 28

Environment

  System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M2 Pro
    Memory: 22.38 MB / 16.00 GB
    Shell: 3.6.4 - /usr/local/bin/fish
milesj commented 1 month ago

@doron-cohen Are you also saying it doesn't error when doing moon run services/extensions:codegen.mockery.base?

doron-cohen commented 1 month ago

No. It runs normally. I can verify it tomorrow

milesj commented 1 month ago

@doron-cohen I tried to recreate this with no luck. Internal tasks fail for me:

Screenshot 2024-07-29 at 3 54 33 PM
milesj commented 1 month ago

1.27.5 fixes the query issue.

doron-cohen commented 1 month ago

Thanks @milesj

doron-cohen commented 1 month ago

This is now solved but now I can't run tasks which extend an internal task. I must set internal: false. This is understandable but not fun to work with. I think task variables will solve this issue.

milesj commented 1 month ago

Yah that seems fair.

I'll close this for now.