fsprojects / fsprojects/Paket

parsing of newline in paket.template give unexpected results

Open
#2,146 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Possible bug

I don't know if this is a bug or a feature, but if it is a feature I kind of need to know the purpose of it because I can't see it. I looked in the documentation for any clues, but didn't find anything.

The initial folder-structure was like this:

	├── tools
	│    └── Chocolate-scripts
	└──  lib
	       └── bin

Followed by the paket.template:

type file
id unique id
title Package title
authors Self
owners Self
summary A package
copyright Copyright © 2017
description A nice description 

files
	// A list of all the files, 20-25 files 
	../../path/to/the/dlls/util.dll ==> lib/bin

	// config
	../../path/to/config/web.config.default ==> lib
	../../path/to/config/log4net.config ==> lib
	// install scripts
	tools ==> tools
	../../paket.lock ==> meta

So the strange thing happend when we built the package. Due to the newline above the config it copies itself(paket.template) and the tools-folder inside the lib-folder. This causes the further build to fail since tools-scripts are trying to reach lib/lib.
├── tools
│ └── Chocolate-scripts
└── lib
├── tools
│ └── Dublicates of the scripts
├── paket.template
└── bin

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

Reproduce the package build using the shown paket.template layout, especially the blank line before the config entries. Trace the paket.template parsing and file-copy behavior to determine why paket.template and tools are placed under lib. Done means the newline no longer changes the intended destinations, with the behavior covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.