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

Implement task level dependencies #1035

Merged
merged 17 commits into from
Nov 18, 2022
Merged

Conversation

ire4ever1190
Copy link
Contributor

@ire4ever1190 ire4ever1190 commented Nov 4, 2022

Implements #482

Syntax works like so

taskRequires "taskName", "somePackage == 0.1.0"

This is done instead of allowing requires at task level since it means a task such as test doesn't need to be redefined just to add dependencies to it (also is easier to implement).

More work still needs to be done, making draft now in case anyone wants to give input while I hack away at it.

What needs to be done (These might work, I just need to write test cases to see if they work)

  • Support lock files
  • Support deps related commands (All dependencies should be outputted)
  • Support develop

Adds test case for setting dependency just for test

This needs a special case in implementation since test itself is a special case in nimble task running
Added cases for lock file and deps
Added current task has parameter into `Options`. Made implementation simplier and felt less hacky

Starting on lockfile support. Current plan is to add in a field to the lock file which states what task it belongs to
One problem I see with it is if the lock file and nimble file go out of sync, but that seems more like a user error
Should all pass now
Tests for more edge cases
@ire4ever1190 ire4ever1190 marked this pull request as ready for review November 6, 2022 09:42
@ire4ever1190
Copy link
Contributor Author

Ready for review 👍

src/nimble.nim Show resolved Hide resolved
@Araq Araq merged commit 85c9df5 into nim-lang:master Nov 18, 2022
@ire4ever1190 ire4ever1190 deleted the implement-482 branch November 18, 2022 06:54
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.

None yet

2 participants