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

Allow exporting codegenerated files/resources #18236

Merged
merged 1 commit into from Feb 13, 2023

Conversation

thejcannon
Copy link
Member

Now with http_source which soon will include arbitrary URL handlers, it would be very convenient to simply use export-codegen to see the file Pants is using. It'll pull from the cache, which is a plus, and handles auth.

Copy link
Member

@kaos kaos left a comment

Choose a reason for hiding this comment

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

I don't recall the motivation for marking these as exportable = False in the first place. Guess it may be due to the files already existing in the repo.. which is still true when not using the http_source which makes me think if there's a nifty way to make this flag swap more cleverly to only be true in case you do use the http_source?

@thejcannon
Copy link
Member Author

Yeah I dunno, but also meh? If someone wants to export a file from in-repo to dist why should we stop them? 😂

@thejcannon thejcannon merged commit f862de1 into pantsbuild:main Feb 13, 2023
@thejcannon thejcannon deleted the allow_export branch February 13, 2023 21:14
thejcannon added a commit to thejcannon/pants that referenced this pull request Feb 13, 2023
Now with `http_source` which soon will include arbitrary URL handlers, it would be very convenient to simply use `export-codegen` to see the file Pants is using. It'll pull from the cache, which is a plus, and handles auth.
@kaos
Copy link
Member

kaos commented Feb 13, 2023

Yeah I dunno, but also meh? If someone wants to export a file from in-repo to dist why should we stop them? 😂

Kind of, I guess.. would be if you run pants codegen-export :: and get a lot of "unexpected" files :P

@thejcannon
Copy link
Member Author

May God take mercy on anyone who does that 😛

@kaos
Copy link
Member

kaos commented Feb 13, 2023

I don't recall the motivation for marking these as exportable = False in the first place. [...]

Related discussion was held in this PR #13761

@thejcannon
Copy link
Member Author

Ah relocated_files makes sense. I like exporting docker files and downloaded artifacts.

thejcannon added a commit that referenced this pull request Feb 14, 2023
…#18241)

Now with `http_source` which soon will include arbitrary URL handlers, it would be very convenient to simply use `export-codegen` to see the file Pants is using. It'll pull from the cache, which is a plus, and handles auth.
@benjyw
Copy link
Sponsor Contributor

benjyw commented Feb 16, 2023

Why did we cherry-pick this into 2.15.x? In general I don't think a new feature should be cherrypicked when we're trying to stabilize a release.

@thejcannon
Copy link
Member Author

Welp. I just realized this was introduced in 2.14 and not 2.15. 😓

My bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants