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

Feature/memory config #44

Merged
merged 6 commits into from
Jul 26, 2020
Merged

Feature/memory config #44

merged 6 commits into from
Jul 26, 2020

Conversation

antony
Copy link
Collaborator

@antony antony commented Jul 4, 2020

Fixes #33 in a way which means we don't need to maintain our own version of the template.

Fixes #43 by allowing memory configuration

Fixes #39 and #38 because they're invalid - the readme, examples, and this PR work without issue.

back to 0 issues!

Copy link
Owner

@thgh thgh left a comment

Choose a reason for hiding this comment

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

Hey, this is pretty cool! I have been tinkering how we could make using vercel-sapper easier and this seems like a good start. I'm not sure though if this is easier than manually addng the files and code. I imagine the perfect experience (apart from built-in support) would be to run npx vercel-sapper on an existing sapper project. What do you think?

@@ -56,7 +57,8 @@ exports.build = async ({
...applicationFiles
},
handler: 'launcher.launcher',
runtime: runtime
runtime,
...memory ? { memory } : {}
Copy link
Owner

Choose a reason for hiding this comment

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

Why not simply memory : config.memory?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are we defaulting it? I need to check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey, this is pretty cool! I have been tinkering how we could make using vercel-sapper easier and this seems like a good start. I'm not sure though if this is easier than manually addng the files and code. I imagine the perfect experience (apart from built-in support) would be to run npx vercel-sapper on an existing sapper project. What do you think?

The reason I don't like this approach is that it requires manual maintenance of dependencies and such as the template is updated. It's the same reason the svelte TS template is a patch rather than yet another unmaintained fork.

Copy link
Owner

Choose a reason for hiding this comment

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

What manual maintenance would be required? I think it would run the same install.js but it saves the user from having to clone this repo, running npm install, cd into the examples directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Who would be responsible for manually merging the original repo into this one every time it is updated?

Copy link
Owner

Choose a reason for hiding this comment

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

No manual merging required, check it out! #47

examples/README.MD Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
examples/sapper-template/install.js Show resolved Hide resolved
To install a working example of a vercel-sapper template ready for deployment or development, see the `examples` directory.

```
cd examples/sapper-template
Copy link
Owner

Choose a reason for hiding this comment

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

Is the first step npx degit ...vercel-sapper or git clone ... or how do you see this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could probably include a git clone step before this. I'm not sure degit is required since the template does its own degit, and there isn't really any need to remove git control from the parent project.

@thgh
Copy link
Owner

thgh commented Jul 7, 2020

Do you mind not closing unrelated issues with this PR? I wish to keep issues open as a signal that something may be unstable and to lower the barrier for possible contributors that may comment with reproduction info. I know that there are quite some similar unreproducible open issues, but I hope we can improve the project so it's impossible to run into issues. #pitofsuccess

@antony
Copy link
Collaborator Author

antony commented Jul 14, 2020

@thgh which unrelated issues does this refer to? The two "does not work issues"? Both of them claim that checking out the template and trying to run it doesn't work, but it's user error, since this PR proves that it does.

I don't see the value in keeping misleading issues open when there are unknown environmental concerns/user oversights which might affect them - and we can prove, reproducibly, that the provides steps do work. It's offputting to potential users. Both issues have also asked for clarification over a month ago, and had no response, so they've become stale / were indeed errors, and were silently fixed by the authors.

I feel like it's off-putting to future users when there are open issues which seem to imply that the project simply doesn't work. However, it's up to you.

@antony
Copy link
Collaborator Author

antony commented Jul 14, 2020

Hey, this is pretty cool! I have been tinkering how we could make using vercel-sapper easier and this seems like a good start. I'm not sure though if this is easier than manually addng the files and code. I imagine the perfect experience (apart from built-in support) would be to run npx vercel-sapper on an existing sapper project. What do you think?

In my opinion, being able to run npx vercel-sapper on a project is problematic for two reasons:

  1. The script to do this would be intolerant of any changes to server.js, and unpredictable at best. I certainly wouldn't run such a script, and it would definitely break my projects.
  2. Making the builder also a cli which installs the builder, is pretty confusing.

It's a nice idea, but I'm certainly of the opinion that manual control is better.

A deploy to vercel button might be a better idea.

@thgh
Copy link
Owner

thgh commented Jul 25, 2020

This is the result: #47

  1. It should be idempotent and careful not to break projects. It probably will break some projects, but hopefully those edge cases can be ironed out. As for trusting to run a script, everyone can always inspect it.
  2. True, feel free to create a vercel-sapper-template project, but for maintainance purposes, I will include it here so all feedback comes in one place. Could be separated at some point.

@thgh thgh merged commit 0abc993 into vercel Jul 26, 2020
@thgh thgh deleted the feature/memory-config branch July 26, 2020 08:26
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.

Allow configuring of memory 502: BAD_GATEWAY Update demo
2 participants