workers-sdk: Deprecated command and broken link

Hello there,

When trying to follow the example for this CloudFlare workers package, I cannot proceed past the wrangler generate step because CloudFlare saw fit to deprecate completely remove this feature.

Now, instead of working, it fails with an error message:

⚠️  DEPRECATION:
`wrangler generate` has been deprecated, please refer to https://github.com/cloudflare/wrangler2/blob/main/docs/deprecations.md#generate for alternatives

If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new.

This is not entirely true as the definition of the word deprecate[^1] when used in a software context implies that “… [a feature] be usable but regarded as obsolete and best avoided…” (emphasis mine). Since the feature cannot be used at all, it would better be described as retired or deleted.

Normally, I realize this would just be a deeply frustrating experience for the developer, and not actually considered a bug, per se. But the link doesn’t work, and instead yields a 404 on Github.

Since wrangler2 was, until this month, marked as unstable, maybe it would be best to keep this link alive. In fact, it looks like the entire docs directory was removed from the source (maybe it existed at one time?), so there is no easy way to go find the file even if you look for it manually:

trying to follow your deprecation retirement and forced migration guide Screen Shot 2022-05-21 at 7 36 14 PM

[^1]: deprecate: verb, “(chiefly of a software feature) be usable but regarded as obsolete and best avoided, typically due to having been superseded.” Oxford Dictionary via Google.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Thanks for reporting this and providing the detailed information and suggestions. We agree that we should do a better job for people who are used to using wrangler generate to kick off their Workers. Partly this is improved documentation:

  • the broken link should now be fixed But also we should have a well lit path of what to do to create new Workers. Our proposed plan:
  • Work with the create-cloudflare project to lean on that for creating new Worker projects from Github repositories, since this is closest to what Wrangler 1’s generate command does. We will update Wrangler 2 to delegate to that project when you run wrangler generate.
  • Further we need to work with the documentation teams, our own teams that create templates, and 3rd party template providers to ensure that they provide valid templates for Wrangler 2 (and Wrangler 1 if backward compatibility is important for them).

Adding this issue to our project plan back log so that we can prioritise this work alongside other issues.