Annotations
prehonor
Just now
Public
L C, [2022/1/24 下午3:57] [ 图片 ]
L C, [2022/1/24 下午3:57] A dependency is said to be propagated when some of its other-transitive (non-immediate) downstream dependencies also need it as an immediate dependency. [3]
这里的 "依赖的传递性" 具体怎么理解呀?
L C, [2022/1/24 下午3:59] 就是, 如果 a 依赖 b , c , 然后 b 也依赖 c , 这时候说 a 依赖 c 是 propagated 的?
dram🎀, [2022/1/24 下午3:59] a 依赖 b,b propagated 依赖 c,那么 a 把 b 作为依赖的时候也会把 c 拉进来
L C, [2022/1/24 下午4:00] [回复 dram🎀] soga, 这个有点类似运行时依赖
L C, [2022/1/24 下午4:02] [回复 dram🎀] 我感觉这句话不好理解主要是 downstream 这个词的意思拿不准 🤣
L C, [2022/1/24 下午4:05] 还有, 这个表我看不懂咋办 🙈
dram🎀, [2022/1/24 下午4:05] [回复 L C] ?
dram🎀, [2022/1/24 下午4:05] 怎么说呢
dram🎀, [2022/1/24 下午4:06] 比如 git 依赖 openssh
𝚅𝚒𝚝𝚊𝚕𝚢𝚁, [2022/1/24 下午4:06] [回复 Harry Ying] tectonic的路线是把xetex逐步氧化
dram🎀, [2022/1/24 下午4:06] 你把 git 加到 nativeBuildInputs 里
𝚅𝚒𝚝𝚊𝚕𝚢𝚁, [2022/1/24 下午4:06] 它自己就是latex引擎
dram🎀, [2022/1/24 下午4:06] [回复 dram🎀] 然后 git 会跑到你构建环境的 path 里但是 ssh 不会被加到 path 里
dram🎀, [2022/1/24 下午4:07] 但是如果 git 是 propagatedBuildInputs 有 openssh
dram🎀, [2022/1/24 下午4:07] [回复 dram🎀] 那你这样的话 ssh 也会被加到 path 里
L C, [2022/1/24 下午4:07] 好像有点懂了
L C, [2022/1/24 下午4:07] It is important to note that dependencies are not necessarily propagated as the same sort of dependency that they were before, but rather as the corresponding sort so that the platform rules still line up. To determine the exact rules for dependency propagation, we start by assigning to each dependency a couple of ternary numbers
L C, [2022/1/24 下午4:08] "so that the platform rules still line up" , 这是啥意思? "line up"
L C, [2022/1/24 下午4:10] [回复 L C] 这个表里的 build ,host, target 是啥?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:11] 就是platform
L C, [2022/1/24 下午4:13] 可不可以认为是: 每个依赖是一条有向边, 比如 a -> b , 然后我们是在这条边上赋予了一个属性 (上文说的 ternary number), 这个属性的取值是 build ,host, target 三者之一?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:14] 是个offset
Nick Cao | 想吃狐狐, [2022/1/24 下午4:14] offset to current derivation's host platform
L C, [2022/1/24 下午4:15] we start by assigning to each dependency a couple of ternary numbers (-1 for build, 0 for host, and 1 for target), representing how respectively its host and target platforms are “offset” from the depending derivation’s platforms.
所以我还是这句没看懂 😭
Nick Cao | 想吃狐狐, [2022/1/24 下午4:15] 你现在理解为啥是a couple
Nick Cao | 想吃狐狐, [2022/1/24 下午4:15] 不是triple了吗
!/usr/bin/env cat, [2022/1/24 下午4:15]
整几张图看比较好
!/usr/bin/env cat, [2022/1/24 下午4:15]
看 nix 这些洋洋洒洒半篇章
!/usr/bin/env cat, [2022/1/24 下午4:16]
还是弄不明白
L C, [2022/1/24 下午4:16] assigning to each dependency a couple of ternary numbers (-1 for build, 0 for host, and 1 for target)
意思是, 每个依赖是一条有向边, 然后每条边上, 赋予一个 (TernaryNumber, TernaryNumber) 属性?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:16] [回复 L C] 这个是说
Nick Cao | 想吃狐狐, [2022/1/24 下午4:16] depsXY
Nick Cao | 想吃狐狐, [2022/1/24 下午4:16] (X, Y) -> (0, 1)
Nick Cao | 想吃狐狐, [2022/1/24 下午4:16] 这种
Mika Akizuki 秋月🏳️⚧️, [2022/1/24 下午4:17] [回复 𝚅𝚒𝚝𝚊𝚕𝚢𝚁] 氧……化?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:17] [回复 Mika Akizuki 秋月🏳️⚧️] riir
Mika Akizuki 秋月🏳️⚧️, [2022/1/24 下午4:17] [回复 Nick Cao | 想吃狐狐] 呃,不懂
Mika Akizuki 秋月🏳️⚧️, [2022/1/24 下午4:18] 啊,看懂了
Xosdy 🐕, [2022/1/24 下午4:18] rewrite it in rust
!/usr/bin/env cat, [2022/1/24 下午4:18]
用 Rust 重新实现
Mika Akizuki 秋月🏳️⚧️, [2022/1/24 下午4:18] rust -> Fe2O3 -> Oxidize
Mika Akizuki 秋月🏳️⚧️, [2022/1/24 下午4:18] 是这样吗?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:18] 是
L C, [2022/1/24 下午4:20] [回复 Nick Cao | 想吃狐狐] 意思是, 每个依赖是一条有向边, 然后每条边上, 赋予一个 (TernaryNumber, TernaryNumber) 属性?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:21] [回复 L C] 对
Nick Cao | 想吃狐狐, [2022/1/24 下午4:21] 你不要纠结这个啊
Nick Cao | 想吃狐狐, [2022/1/24 下午4:21] 你想想这个数字是干嘛用的
L C, [2022/1/24 下午4:22] -1 for build, 0 for host, and 1 for target
L C, [2022/1/24 下午4:22] 这个没懂
Nick Cao | 想吃狐狐, [2022/1/24 下午4:23] depsBuildBuild -> (-1, -1)
Nick Cao | 想吃狐狐, [2022/1/24 下午4:23] depsHostTarget -> (0, 1)
L C, [2022/1/24 下午4:24] 为什么这个 pair 的 fst 一定 小于或等于 snd 呢?
Nick Cao | 想吃狐狐, [2022/1/24 下午4:25] 你想一个需要大于的使用场景呢
L C, [2022/1/24 下午4:25] 主要我不知道它的意思,,,, (所以自然不知道为什么有这种约束
Nick Cao | 想吃狐狐, [2022/1/24 下午4:26] 其实这里的问题是
Nick Cao | 想吃狐狐, [2022/1/24 下午4:26] build host target这三个词
Nick Cao | 想吃狐狐, [2022/1/24 下午4:26] 被用作两种不同的意思
Nick Cao | 想吃狐狐, [2022/1/24 下午4:26] 所以不好理解
Nick Cao | 想吃狐狐, [2022/1/24 下午4:26] 首先是对于一个特定的derivation来说
Nick Cao | 想吃狐狐, [2022/1/24 下午4:27] 他有自己的drv->build,drv->host,drv->target
Nick Cao | 想吃狐狐, [2022/1/24 下午4:27] [回复 L C] 也就是这表里面的第一行
L C, [2022/1/24 下午4:27] [回复 Nick Cao | 想吃狐狐] 这个没懂
Nick Cao | 想吃狐狐, [2022/1/24 下午4:27] 就是比如你有一个gcc
Nick Cao | 想吃狐狐, [2022/1/24 下午4:28] 他是在x86上面编译出来的
Nick Cao | 想吃狐狐, [2022/1/24 下午4:28] 能跑在aarch64上
Nick Cao | 想吃狐狐, [2022/1/24 下午4:28] 支持编译出riscv64的代码
Nick Cao | 想吃狐狐, [2022/1/24 下午4:28] 那 gcc->build 就是 x86
Nick Cao | 想吃狐狐, [2022/1/24 下午4:28] gcc->host 就是 aarch64
Nick Cao | 想吃狐狐, [2022/1/24 下午4:29] gcc->target 就是 riscv64
Nick Cao | 想吃狐狐, [2022/1/24 下午4:29] 所以说是对于gcc这个derivation而言的
Nick Cao | 想吃狐狐, [2022/1/24 下午4:29] 三个platform
L C, [2022/1/24 下午4:29] ok
Nick Cao | 想吃狐狐, [2022/1/24 下午4:29] 好那这里有三个platform
Nick Cao | 想吃狐狐, [2022/1/24 下午4:29] 我们注意到
Nick Cao | 想吃狐狐, [2022/1/24 下午4:30] gcc->build其实是不关键的
Nick Cao | 想吃狐狐, [2022/1/24 下午4:30] 如果我们已经编译好了这个gcc
Nick Cao | 想吃狐狐, [2022/1/24 下午4:30] 那它不管被如何使用
Nick Cao | 想吃狐狐, [2022/1/24 下午4:30] 都不会被这个build platform影响
L C, [2022/1/24 下午4:30] 对的
Nick Cao | 想吃狐狐, [2022/1/24 下午4:30] 所以关键是host和target
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] [回复 Nick Cao | 想吃狐狐] 那这个使用
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] 其实在这里就是指被作为依赖
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] 那我们将这个gcc作为依赖
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] 去编译一个hello
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] 对于这个hello而言
Nick Cao | 想吃狐狐, [2022/1/24 下午4:31] 他也有三个platform吧
L C, [2022/1/24 下午4:31] 这就是是你说的 "为啥是a couple 不是triple"
Nick Cao | 想吃狐狐, [2022/1/24 下午4:32] [回复 L C] 对
Nick Cao | 想吃狐狐, [2022/1/24 下午4:32] [回复 Nick Cao | 想吃狐狐] 同时又因为他还没有被build出来
Nick Cao | 想吃狐狐, [2022/1/24 下午4:32] 所以它的build platform是不可以忽视的
Nick Cao | 想吃狐狐, [2022/1/24 下午4:32] 现在为了这个hello
Nick Cao | 想吃狐狐, [2022/1/24 下午4:32] 我们需要找一个合适的gcc
Nick Cao | 想吃狐狐, [2022/1/24 下午4:33] 第一个要求
Nick Cao | 想吃狐狐, [2022/1/24 下午4:33] 这个gcc需要能在hello->build上跑
Nick Cao | 想吃狐狐, [2022/1/24 下午4:33] 第二个要求
Nick Cao | 想吃狐狐, [2022/1/24 下午4:33] gcc产生的代码
nicball, [2022/1/24 下午5:00] nix💊里写过propagated(其实是造了一个贫民版stdenv(唠叨
nicball, [2022/1/24 下午5:00] (但是没讲platform
Nick Cao | 想吃狐狐, [2022/1/24 下午5:00] 这个应该写在交叉编译导论里
prehonor
Public
Annotations can be freely reused by anyone for any purpose.