Skip to content

Commit 58a403f

Browse files
arcanisbestander
authored andcommitted
Moves files around (#56)
1 parent 44f84bb commit 58a403f

8 files changed

+41
-41
lines changed
File renamed without changes.
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
- Start Date: 2016-12-13
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
4-
5-
# Summary
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/37
3+
- Yarn Issue: https://github.com/yarnpkg/yarn/issues/2241
4+
5+
# Summary
66

77
`yarn install` should be idempotent.
88

9-
Ideally, the result of `yarn install` would not be statefully dependent on the contents of an existing `node_modules`, and would ensure the resulting `node_modules` is identical regardless of whether there is an existing `node_modules` or not. This seems very inline with the spirit of yarn's goal of deterministic builds (same `node_modules` independent of whether `node_modules` exists or the version of node that generated it).
10-
11-
# Motivation
12-
9+
Ideally, the result of `yarn install` would not be statefully dependent on the contents of an existing `node_modules`, and would ensure the resulting `node_modules` is identical regardless of whether there is an existing `node_modules` or not. This seems very inline with the spirit of yarn's goal of deterministic builds (same `node_modules` independent of whether `node_modules` exists or the version of node that generated it).
10+
11+
# Motivation
12+
1313
Presently, a major headache with `npm` / binary `node_modules` (e.g., `heapdump`) is the need to manually run `npm rebuild` when upgrading node. Communicating this preemptively to developers prior to an upgrade is logistically very manual, leading to "Why is this broken for me?" when errors are not obvious (e.g., `Error: Cannot find module '../build/Debug/addon'`).
1414

15-
Since `yarn install` is near instant when dependencies are unchanged, having developers run `yarn install` after a `git pull` is no big deal. However, having developers regularly run `yarn install --force` with many dependencies is a non-starter (1s vs 100s).
16-
17-
# Detailed design
15+
Since `yarn install` is near instant when dependencies are unchanged, having developers run `yarn install` after a `git pull` is no big deal. However, having developers regularly run `yarn install --force` with many dependencies is a non-starter (1s vs 100s).
16+
17+
# Detailed design
1818

1919
Assuming both a `package.json` and `yarn.lock` in the project's root...
2020

@@ -27,27 +27,27 @@ Assuming both a `package.json` and `yarn.lock` in the project's root...
2727
**Path B: (`node_modules` installed w/ node@X, node@Y)**
2828

2929
- **Current, non-ideal**: `yarn install` => binaries for node@X
30-
-                         **Ideal**: `yarn install` => binaries for **node@Y**
31-
32-
33-
# How We Teach This
34-
30+
- **Ideal**: `yarn install` => binaries for **node@Y**
31+
32+
33+
# How We Teach This
34+
3535
*What names and terminology work best for these concepts and why?*
3636

3737
"`node_modules`" for node context, "rebuild" & "build" for npm legacy; "idempotent" for technical accuracy; "install" & "force" for yarn context (i.e., `yarn install`).
3838

3939
*How is this idea best presented?*
4040

4141
As a continuation of existing Yarn patterns: "deterministic builds".
42-
42+
4343
*Would the acceptance of this proposal mean the Yarn documentation must be re-organized or altered?*
4444

4545
No.
4646

4747
*Does it change how Yarn is taught to new users at any level?*
4848

49-
Yes. This will all but eliminate the need to explain why rebuilds are needed after an upgrade.
50-
49+
Yes. This will all but eliminate the need to explain why rebuilds are needed after an upgrade.
50+
5151
*How should this feature be introduced and taught to existing Yarn users?*
5252

5353
By assuring users:
@@ -58,11 +58,11 @@ No need to caveat ^ this with:
5858

5959
> Unless you upgraded node, then you need rebuild your binary modules with `yarn install --force`,
6060
but don't worry about it reinstalling all your modules, even the non-binary ones.
61-
62-
# Drawbacks
63-
64-
Complexity of detection / knowing when to rebuild.
65-
66-
# Alternatives
67-
61+
62+
# Drawbacks
63+
64+
Complexity of detection / knowing when to rebuild.
65+
66+
# Alternatives
67+
6868
Use a flag: `yarn install --check-rebuild` and/or support it in `.yarnrc` (`install-check-rebuild true`)

text/0000-license-check.md renamed to accepted/0000-license-check.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- Start Date: 2016-10-12
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/7
3+
- Yarn Issue: https://github.com/yarnpkg/yarn/issues/904
44

55
# Summary
66

text/0000-publish-config.md renamed to accepted/0000-publish-config.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
- Start Date: (1-10-17)
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/40
43

54
# Summary
65

@@ -40,14 +39,14 @@ as well.
4039
# Drawbacks
4140

4241
As with any new code, it's new code. Adding it expands the amount of functionality
43-
that yarn now supports. That's the largest drawback I can think of.
42+
that yarn now supports. That's the largest drawback I can think of.
4443

4544
# Alternatives
4645

4746
I considered a --registry flag for the yarn publish command. This would likely accomplish the
48-
same functionality but is prone to error as most hand typed things are.
47+
same functionality but is prone to error as most hand typed things are.
4948

5049
# Unresolved questions
5150

5251
I'm a relative newbie to yarn, so my design might be too simplistic or not accounting
53-
for things I just don't know about.
52+
for things I just don't know about.
File renamed without changes.

text/0000-yarn-knit.md renamed to accepted/0000-yarn-knit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- Start Date: 2017-01-13
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/41
3+
- Yarn Issue: https://github.com/yarnpkg/yarn/issues/1213
44

55
# Summary
66

text/0000-offline-mirror-pruning.md renamed to implemented/0000-offline-mirror-pruning.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- Start Date: 2017-02-11
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/49
3+
- Yarn Issue: https://github.com/yarnpkg/yarn/issues/2109
4+
- Implementation: https://github.com/yarnpkg/yarn/pull/2836
45

56
# Summary
67

text/0000-offline-resolution-field.md renamed to implemented/0000-offline-resolution-field.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- Start Date: (fill me in with today's date, YYYY-MM-DD)
2-
- RFC PR: (leave this empty)
3-
- Yarn Issue: (leave this empty)
1+
- Start Date: 28 Feb 2017
2+
- RFC PR: https://github.com/yarnpkg/rfcs/pull/51
3+
- Implementation: https://github.com/yarnpkg/yarn/pull/2970
44

55
# Summary
66

@@ -15,7 +15,7 @@ Tentative implementation: https://github.com/yarnpkg/yarn/pull/2970/
1515
Yarn currently has two different type of values for the lockfile `resolved` fields:
1616

1717
- When online, they're in the form `${source}/${name}-${version}.tar.gz#${hash}`
18-
18+
1919
- But when offline, they're instead `${name}-${version}.tar.gz#${hash}`
2020

2121
The current reasoning (or at least side effect) seems to be that it allows the fetch process to refuse installing things from the network when running under the `--offline` switch (and to always fetch things from the network otherwise instead of looking into the offline mirror). Unfortunately, such a separation also makes it harder to switch between working with a remote registry and an offline repository (for example, dev environments might not need the offline repository, but under the current design they can't do without).

0 commit comments

Comments
 (0)