-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add support of the time module in Starlark Processor #9004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤝 ✅ CLA has been signed. Thank you!
@srebhan about the build failure on |
Ok closed. Please note, that your build errors/dependency hell is resolved with #8937 being merged (tested locally). |
@essobedo are you using the Go version 1.16+ locally when running `make tidy'? If not could you update Go to the latest version and run it again and push the changes. |
@sspaink it seems to work now, many thanks |
Great work on the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like new artifacts were built from this PR. Get them here!
Artifact URLs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like new artifacts were built from this PR. Get them here!
Artifact URLs
@essobedo Do you think you could add |
@sjwang90 yes of course, I will propose a PR asap |
Required for all PRs:
fixes #9000
Motivation
The upstream project starlark-go has added a new module called time to support dates and durations, thus the goal of this feature request is to add the support of this new module in the Starlark Processor.
Modifications
go.starlark.net
time
ofgo.starlark.net
in the Starlark ProcessorREADME.md
Result
In Starlark script, we can now import the module with
load('time.star', 'time')
, and then have access to all the corresponding building functions and constants.NB: Beware the built-in function
from_timestamp
only supports timestamps in seconds.