plotly / plotly/Plotly.NET

Giraffe.ViewEngine.StrongName breaks compatability with Giraffe server

未關閉
#452 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
F#
星號
860
分支
99
平均合併
22 分鐘
30 天內合併 PR
1

描述

Description

Hey, thanks for you effort in this library, it really is amazing.

I came about an issue with the fork project mentioned here https://github.com/giraffe-fsharp/Giraffe.ViewEngine/issues/23

It is currently not possible to render a chart to json in a giraffe backend via toJson gChart as it was added in version 4.1.0 which doesn't work with giraffe due to a presence of forked Giraffe.ViewEngine.StrongName package

Components.fs(286,9): error FS0001: All elements of a list must be implicitly convertible to the type of the first element, which here is 
'Giraffe.ViewEngine.HtmlElements.XmlAttribute (Giraffe.ViewEngine.StrongName, Version=2.0.0.0, Culture=neutral, PublicKeyToken=028aa8e2a326f4d0)'. 
This element has type 'Giraffe.ViewEngine.HtmlElements.XmlAttribute (Giraffe.ViewEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)'. 
[Components.fsproj::TargetFramework=net8.0]
Repro steps
dotnet new giraffe -o plot
cd plot
dotnet add package Plotly.Net
dotnet build
Expected behavior

Project builds

Actual behavior
/home/a/projects/plot/Program.fs(57,14): error FS0001: This expression was expected to have type    'Giraffe.ViewEngine.HtmlElements.XmlNode (Giraffe.ViewEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)'    but here has type    'Giraffe.ViewEngine.HtmlElements.XmlNode (Giraffe.ViewEngine.StrongName, Version=2.0.0.0, Culture=neutral, PublicKeyToken=028aa8e2a326f4d0)' [/home/a/projects/plot/plot.fsproj]

Build FAILED.
Known workarounds

Fork Plotly.Net and revert the change

Related information
  • Operating system Linux
  • Branch v4.1.0+
  • dotnet 8.0.204

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

使用 Giraffe template、Plotly.Net 4.1.0 或更新版本,以及所描述的 dotnet 8.0.204 環境,重現回報的建置失敗。檢查 Components.fs 第 286 行和 Program.fs 第 57 行背後的相依性版本;完成標準是範例專案能夠建置,且不存在 Giraffe.ViewEngine 與 Giraffe.ViewEngine.StrongName 之間的型別不相容。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
fsharp
領域
backend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。