Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compatibility: web-cssom-view 0.1.0 drops scrollIntoView options through purs-specific FFI

Open
#613 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
javascript, node.js, rust

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Rust
Stars
117
Forks
11
Avg merge
4h 22m
Merged PRs (30d)
126

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purefunctor/purescript-iris

All issues in purefunctor/purescript-iris

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.