question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Source Directory

See original GitHub issue

I’ve managed to get elm-git-install to install a component library from Gitlab. However, it expects it to be in root/src. The idea was this Elm UI component library we’re building would live in a monorepo with other tech stacks like React, documentation, etc. so it’d be in a sub-directory. I’ve briefly glanced at the elm-git-install source code, and it appears y’all were thinking along the same lines:

const depSources = ['src']; // Can packages have source directories?

If you look at how it installs it, it puts your repo + “/src” at the end. Before I go attempting to make a PR, I just want to make sure I have the right idea here. It appears I’d need to modify populateSources to look at opts to see if there are any custom options, and instead of hardcoding /src it’d be like opts.path + '/src' or something like that.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
robinheghancommented, Jun 22, 2022

the package’s elm.json is never read by the compiler

elm-git-install only downloads the relevant code. The code is still compiled by the elm compiler. Also, any time the elm compiler performs modifications (like adding a package) it strips away unsupported properties.

0reactions
robinheghancommented, Jul 6, 2022

In think the way this would have to be implemented, is that elm-git.json is altered so that instead of just being an object of gitUrl -> version, it also works with gitUrl -> { path: customPath, version: version }.

This is not an ideal situation, though, as you’d have to specify it per project, but I think that’s the best we can do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change source directory in profile maven - Stack Overflow
According to the documentation, you can change only few <build> parameters in the profile and <sourceDirectory> is not one of them.
Read more >
Additional Source Directories in Maven - Baeldung
In this tutorial, we'll explain how we can add multiple source directories in the Maven-based Java project. 2. Extra Source Directory.
Read more >
Guide to Using Maven when You Can't Use the Conventions
Maven natively supports multiple source directories for the purposes of generated sources. Producing Multiple Unique JARs from a Single Source Directory.
Read more >
Source Directory - Screwdriver Guide
Source directory can be used to specify a custom directory that a pipeline is based upon. You can specify it when you create...
Read more >
Customize your source directory - chezmoi
Customize your source directory · Use a subdirectory of your dotfiles repo as the root of the source state · Use a different...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found