Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with Octokit path not found #62

Open
houstonhaynes opened this issue Aug 19, 2023 · 4 comments
Open

Build fails with Octokit path not found #62

houstonhaynes opened this issue Aug 19, 2023 · 4 comments

Comments

@houstonhaynes
Copy link

houstonhaynes commented Aug 19, 2023

I'm working on my own fork of tryFSharp for my personal site - fsharpnotes.net

I've updated the global.json to using .NET 6 and otherwise haven't done anything special. When I run

fake run build.fsx -t "WatchApp"

I get a path error that (by the eye, at least) should resolve. In fact there are multiple references to the path, which in and of itself is a bit odd. Can anyone weigh in on why this is happening? Is there something I missed along the way - beyond paket restore/build ? Thanks!

image

@houstonhaynes
Copy link
Author

houstonhaynes commented Aug 19, 2023

Update - I hand-jammed a path to the ref and started getting a smaller set of slighly more interesting errors. Most of them were asking for specific type annotations for FakeHelpers such as

let loadReleaseNotes projFile =
    let projDir =
        if (Path.HasExtension(projFile: string)) // **here**
        then Path.GetDirectoryName(projFile)
        else projFile
    findFileUpwards RELEASE_NOTES projDir
    |> ReleaseNotesHelper.LoadReleaseNotes

let needsPublishing silent (readVersionInLine: string->string option) (releaseNotes: ReleaseNotes) projFile =
    let print msg =
        if not silent then
            let projName =
                let projName : string = Path.GetFileNameWithoutExtension(projFile: string) // **here**
                if projName = "package" // package.json
                then Path.GetFileName(Path.GetDirectoryName(projFile))
                else projName
            printfn "%s > %s" projName msg
    if releaseNotes.NugetVersion.ToUpper().EndsWith("NEXT")
    then
        print "Version in Release Notes ends with NEXT, don't publish yet."
        false
    else
        File.ReadLines(projFile)
        |> Seq.tryPick readVersionInLine
        |> function
            | None -> failwithf "Couldn't find version in %s" projFile
            | Some version ->
                let sameVersion = version = releaseNotes.NugetVersion
                if sameVersion then
                    sprintf "Already version %s, no need to publish" releaseNotes.NugetVersion |> print
                not sameVersion

This got me as far as this (verbose) output. Again - it seems to not know how to find FakeLib, which is present in the folder structure. I suspect this might be a "Fake upgrade" issue as suggested in the log but I'm not sure how to proceeed - as the instructions don't line up with what I see in the project. Perhaps his is a pre-v4 version of Fake?

console_log.ps1.txt

@houstonhaynes
Copy link
Author

So I'm making progress - but still a bit befuddled by an error message which shouldn't exist. I'm looking right at the DLL file and the build.fsx referencing the path. I have no idea why the script error is occurring.

image

@MangelMaxime
Copy link

Right now, I don't have a lot of ideas.

Are you able to load the .dll file and use it from a "normal" fsx file? Running it using dotnet fsi my-file.fsx.

In the past FAKE, was doing additional stuff for loading dependencies so perhaps something is wrong with it.

@houstonhaynes
Copy link
Author

OK - thanks for chiming in. I'll keep banging away at it. My hope was that the "path not found" (where the path is clearly present) was actually some other error. I'll try what you suggest and do a bit more digging later in the day (local time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants