OctoLinker / OctoLinker

OctoLinker — Links together, what belongs together

Home Page:https://octolinker.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haskell not working

adamsmd opened this issue · comments

Describe the bug
OctoLinker doesn't seem to be working on Haskell files.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/idris-lang/Idris-dev/blob/master/src/Idris/Main.hs
  2. Scroll down to the 'import' statements

Expected behavior
The import statements should become links.

Actual behavior
The import statements are not links.

Other potentially useful information
I'm using OctoLinker 6.3.0 from addons.mozzila.org and Firefox 75.0 on Ubuntu 19.10.

Note that OctoLinker is working for Java files (e.g., https://github.com/remkop/picocli/blob/master/src/main/java/picocli/AutoComplete.java), so I suspect it is something specific to Haskell or OctoLinker's plugin for Haskell.

I am using OctoLinker as it comes "out-of-the-box" with a personal access token but no other configuration. Is there some configuration I need to do for Haskell to work?

Note that in https://github.com/idris-lang/Idris-dev/blob/master/src/Idris/Main.hs the lines starting with 'import Idris' are importing files local to the project. But the lines starting with 'import Control', 'import Data' and 'import System' are external library imports.

@stefanbuck this is an odd one. In Chrome this file loads fine, but in FireFox it throws a network error on

response = await fetch(
`https://api.github.com/repos/${user}/${repo}/git/trees/${branch}?recursive=1`,
{
method: 'GET',
headers,
},
);

I can run that exact code in dev tools and it resolves as expected, but inside the extension it throws.

TypeError: "NetworkError when attempting to fetch resource."
    default fetch-tree.js:17
    default loader.js:138
    run app.js:53

I get that error on every .hs file I load in FireFox. I'm also seeing it when I view other file types with local references such as

import notification from './notification';
import Plugins from './plugin-manager.js';
import debugMode from './debug-mode.js';
import loader from './loader.js';
import * as loadPlugins from './load-plugins';
and
<ItemGroup>
<!-- @OctoLinkerResolve(<root>/dotnet/classic/Project.csproj) -->
<ProjectReference Include="../classic/Project.csproj" />
</ItemGroup>
<ItemGroup>
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<Compile Include="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<Compile Update="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<Content Include="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<Content Update="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<EmbeddedResource Include="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<EmbeddedResource Update="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<None Include="../Directory.Build.props" />
<!-- @OctoLinkerResolve(<root>/dotnet/Directory.Build.props) -->
<None Update="../Directory.Build.props" />
</ItemGroup>
<ItemGroup>
<!-- @OctoLinkerResolve(<root>/dotnet/foo bar/test file.cs) -->
<Content Include="../foo bar/test file.cs" />
</ItemGroup>

Thanks both. I looked into it and it turned out it was my fault with the recent permission update #894. I'll release a new version asap