Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Use Metadata struct #217

Closed
wants to merge 2 commits into from
Closed

Use Metadata struct #217

wants to merge 2 commits into from

Conversation

xtuc
Copy link
Member

@xtuc xtuc commented Jun 5, 2019

No description provided.

Copy link
Contributor

@ashleygwilliams ashleygwilliams left a comment

Choose a reason for hiding this comment

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

i love the direction of this- let's make sure it also works for the other build paths tho.

@xtuc
Copy link
Member Author

xtuc commented Jun 7, 2019

Does the other build paths generate a JSON binding?

@ashleygwilliams
Copy link
Contributor

@xtuc - the RustWasm one does- the javascript one does not!

@xtuc
Copy link
Member Author

xtuc commented Jun 7, 2019

Actually I don't think we generate it in the RustWasm part, see https://github.com/cloudflare/wrangler/blob/47dd18dd533817caae927c64dbf3360a2c2d5fb9/src/commands/publish/mod.rs#L198

It relies on a file on the fs.

@xtuc xtuc force-pushed the refactor-use-metadata-struct branch from 22d40ac to 565d65c Compare June 25, 2019 10:05
@ashleymichal
Copy link
Contributor

ashleymichal commented Jun 25, 2019

Moving this here out of chat:

Ultimately, we want to provide the same KV integration experience in all project types. This means that we'll have to generate the bindings entries for those unless we ask people to configure in a metadata.json, which would be a less than ideal experience.

I don't think the hard-coded, FS-accessed metadata_wasm.json is a good long-term solution. The "name" and "part" are things that should be either configured in your wrangler.toml, or following a convention. I'm inclined to put it in the toml, and have the template(s) updated accordingly, but i'm open to objections on that point.

To me, this suggests that this PR is incomplete: we should generate metadata for all multipart workers. Either this PR needs to be updated to address rustwasm projects, or it needs to be followed up by a second PR that does. Both of those should be in place before landing #215.

@xtuc
Copy link
Member Author

xtuc commented Jul 1, 2019

Closes in favor of #285

@xtuc xtuc closed this Jul 1, 2019
@xtuc xtuc deleted the refactor-use-metadata-struct branch July 1, 2019 10:15
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.

None yet

3 participants