fsprojects / fsprojects/Paket

From function getSHA1OfBranch:

Open
#3,890 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

From function getSHA1OfBranch:

        | ModuleResolver.SingleSourceFileOrigin.GitHubLink -> 
            let url = sprintf "https://api.github.com/repos/%s/%s/commits/%s" owner project branch
            let! document = lookupDocument(auth authKey url,url)
            match document with
            | Some document ->
                let json = JObject.Parse(document)
                return json.["sha"].ToString()
            | None -> 
                failwithf "Could not find hash for %s" url
                return ""

Do we want to store this sha from JSON still? Currently paket.lock looks e.g. like this:

GITHUB
  remote: zurb/bower-foundation
  specs:
    css/foundation.css (3d47a1111f1a94b594215deb41839c3ac121cb6e)
    css/normalize.css (3d47a1111f1a94b594215deb41839c3ac121cb6e)
    js/foundation.min.js (3d47a1111f1a94b594215deb41839c3ac121cb6e)

...so should there be some other hash also, calculated over the file content?

Originally posted by @Thorium in https://github.com/fsprojects/Paket/issues/1104#issuecomment-154368944

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating getSHA1OfBranch and examining how its returned SHA is written into paket.lock. Compare the current GitHub commit SHA with the question about a content-derived hash, then determine the intended lock-file behavior and how completion would be verified; the issue does not name a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.