Compatibility: web-cssom-view 0.1.0 drops scrollIntoView options through purs-specific FFI
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- javascript, node.js, rust
调研方向
Start with src/Web/CSSOMView/Element.js, especially the scrollIntoViewOptions handling at lines 17–27, then inspect src/Main.purs and src/Main.js. Run the stated spago build and iris build reproductions in separate output trees and compare the generated calls; done means the compiler-versus-package ownership and compatibility policy are resolved.
由索引模型根据 Issue 内容生成。
描述
This tracks a package FFI compatibility mismatch, not an established Iris compiler bug. purescript-web/[email protected] reads purs-generated .value0 and enum .constructor.name in src/Web/CSSOMView/Element.js. Iris 0.1.1 uses a different valid representation for Maybe, so a Just options argument silently takes the no-argument branch. The broader upstream concern is purescript-web/purescript-web-cssom-view#7; this tracker currently has no issue for the concrete cross-compiler symptom. The upstream repository is read-only to this account, so I could not add the reproducer there.
Standalone repro with registry package set 81.1.0, web-cssom-view 0.1.0, purs 0.15.15 / Iris 0.1.1, Node 22.16.0:
spago.yaml:
package:
name: cssom-view-repro
dependencies:
- prelude
- effect
- console
- maybe
- web-dom
- web-cssom-view
workspace:
packageSet:
registry: 81.1.0
src/Main.purs:
module Main where
import Prelude
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Console (log)
import Web.CSSOMView as View
import Web.CSSOMView.Element as Scroll
import Web.DOM.Element (Element)
foreign import element :: Element
foreign import calls :: Effect (Array String)
main :: Effect Unit
main = do
Scroll.scrollIntoView Nothing element
Scroll.scrollIntoView (Just { block: View.End, inline: View.Nearest, behavior: View.Smooth }) element
log <<< show =<< calls
src/Main.js (synthetic host; this checks FFI delivery, not browser geometry):
const seen = [];
export const element = {
scrollIntoView(...args) { seen.push(JSON.stringify(args)); }
};
export const calls = () => seen.slice();
Build once with spago build and once with iris build into separate output trees, then invoke each generated Main.main() in Node. Purs yields the first no-argument call [], then an argument containing block: "end" and inline: "nearest". Iris yields [] for both calls. The behavior field is currently omitted even by the purs path; this report isolates loss of the entire options argument.
The package FFI checks scrollIntoViewOptions.value0 (lines 17–27), which exists in purs output but not Iris’s { tag: "Just", _1: options }. A package-side conversion to JS primitives or FFI accessors, as suggested upstream, would remove reliance on compiler-specific constructor layout. Please treat this as a compatibility-policy/package fix discussion, not a request to change Iris’s constructor representation solely for this package. This report includes no private test-repository links or materials.
- 主要语言
- Rust
- 星标
- 117
- 派生
- 11
- 平均合并
- 4 小时 22 分钟
- 30 天内合并 PR
- 126
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purefunctor/purescript-iris 的其他 Issue
-
bug language-server
难度 2/5 1-3 小时 新手友好度 70/100
purefunctor/purescript-iris#552 ·
维护者通常 1 天内回复
-
bug language-server
难度 2/5 1-3 小时 新手友好度 70/100
purefunctor/purescript-iris#551 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 58/100
purefunctor/purescript-iris#610 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
purefunctor/purescript-iris#560 ·
维护者通常 1 天内回复
-
tooling
难度 4/5 3-5 天 新手友好度 58/100
purefunctor/purescript-iris#507 ·
维护者通常 1 天内回复
查看 purefunctor/purescript-iris 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
-
area: cli bug priority: P2 ready-for-agent
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复