Giter VIP home page Giter VIP logo

Comments (19)

Sleepful avatar Sleepful commented on June 13, 2024 2

I guess this works for now :S

cd "~/Library/Application Support/flavours/base16"
gsed -i '/aram/d' sources/schemes/list.yaml
flavours update templates
flavours update schemes

from flavours.

titaniumtraveler avatar titaniumtraveler commented on June 13, 2024 2

Have the same problem and ^ these fixes doesn't seem to help. flavours update schemes is what is giving the error. And I feel stuck not being able to use the program in any way. Really want to, though.

It seems that a few of the scheme sources are no longer available, breaking the update process.
Specifically ia: https://github.com/aramisgithub/base16-ia-scheme and solarized: https://github.com/aramisgithub/base16-solarized-scheme.
(When trying to access the github I only get a 404.)

Fixing this should be as easy as commenting both out in $XDG_DATA_HOME/flavours/base16/sources/schemes/list.yml.
(Where $XDG_DATA_HOME defaults to $HOME/.local/share, so $HOME/.local/share/flavours/base16/sources/schemes/list.yml.)

Though if you use flavours update list, (or flavours update all, which internally calls this,) you will have to modify it again.

from flavours.

Sleepful avatar Sleepful commented on June 13, 2024

btw the latest release does not include the latest commit, also you do not offer instructions to install from source so I do not know how to go about that

from flavours.

Sleepful avatar Sleepful commented on June 13, 2024

Uhg I guess these are the culprits

https://github.com/chriskempson/base16-schemes-source/blob/main/list.yaml#L37-L66

from flavours.

Sleepful avatar Sleepful commented on June 13, 2024

also I have to pass in the config path or it wont find it:

flavours apply nord

Error: Couldn't get items from config file. Check the default file or github for config examples.

flavours --config ~/.config/flavours/config.toml apply nord
:ok

from flavours.

Sleepful avatar Sleepful commented on June 13, 2024

Re last comment:

I had to pass in --config because XDG_CONFIG_HOME was not available, a better error message would be helpful :)

from flavours.

vladnick31 avatar vladnick31 commented on June 13, 2024

Have the same problem and ^ these fixes doesn't seem to help.
flavours update schemes is what is giving the error. And I feel stuck not being able to use the program in any way. Really want to, though.

from flavours.

vladnick31 avatar vladnick31 commented on June 13, 2024

Yeah I guess this worked for the schemes to update. Still when trying to apply any scheme it tells me there are no .mustache files in the .config/flavours/templates"..." folder. Even though every folder has a "template.yaml" file. Must have configured something wrong I guess.

from flavours.

MrPenguin07 avatar MrPenguin07 commented on June 13, 2024

Just got hit by this, also building from source.

Project seems unmaintained how unfortunate. May have to maintain this locally.

from flavours.

titaniumtraveler avatar titaniumtraveler commented on June 13, 2024

Just got hit by this, also building from source.

Project seems unmaintained how unfortunate. May have to maintain this locally.

I mean flavours uses https://github.com/chriskempson/base16-schemes-source as default source for schemes, which is kind of badly maintained.

See:

let default_s_repo = "https://github.com/chriskempson/base16-schemes-source.git";

from flavours.

MrPenguin07 avatar MrPenguin07 commented on June 13, 2024

Just got hit by this, also building from source.
Project seems unmaintained how unfortunate. May have to maintain this locally.

I mean flavours uses https://github.com/chriskempson/base16-schemes-source as default source for schemes, which is kind of badly maintained.

See:

https://github.com/Misterio77/flavours/blob/884dadcceaad141b33f68155dc7f4b7eb472b1b9/src/operations/update.rs#L48

Indeed, ideally this external list should be forked and under flavours control (considering a simple 404 on this list breaks initial setup here!) or simply integrated into flavours however I see the author was made aware of this quite some time ago and seems uninterested?
Would a PR be merged?

from flavours.

titaniumtraveler avatar titaniumtraveler commented on June 13, 2024

Indeed, ideally this external list should be forked and under flavours control (considering a simple 404 on this list breaks initial setup here!)

You can actually do that yourself! While it is not really documented, you can override the default by either

  • setting schemes/templates in the config.toml
  • setting schemes/templates in $XDG_DATA_HOME/flavours/base16/sources.yaml (defaults to $HOME/.local/share/flavours/base16/sources.yaml)

See the get_sources function:

fn get_sources(file: &Path, config: &Config) -> Result<(String, String)> {
// Default repos
let default_s_repo = "https://github.com/chriskempson/base16-schemes-source.git";
let default_t_repo = "https://github.com/chriskempson/base16-templates-source.git";
// config source indicators
let use_config_sources = config.schemes.is_some();
let use_config_templates = config.templates.is_some();
// use available config sources, otherwise use defaults
let (mut s_repo, mut t_repo) =
match (config.schemes.as_ref(), config.templates.as_ref()) {
(Some(s), Some(t)) => (String::from(s), String::from(t)),
(Some(s), None) => (String::from(s), String::from(default_t_repo)),
(None, Some(t)) => (String::from(default_s_repo), String::from(t)),
(None, None) => (String::from(default_s_repo), String::from(default_t_repo)),
};
// Try to open file
let sources_file = match File::open(file) {
// Success
Ok(contents) => contents,
// Handle error once, so if file is not found it can be created
Err(_) => {
// Try to write config sources if they exist, otherwise use defaults
write_sources(&s_repo, &t_repo, file)?;
// Try to open it again, returns errors if unsucessful again
File::open(file).with_context(|| format!("Couldn't access {:?}", file))?
}
};
// Bufreader from file
let reader = BufReader::new(sources_file);
// Iterate lines
for line in reader.lines() {
let line = line?;
// Get name and repo from line
let (name, repo) = parse_yml_line(&line)?;
// Store in correct variable
// Only use sources.yaml sources if sources not specified in config
if name == "schemes" && !use_config_sources {
s_repo = repo;
} else if name == "templates" && !use_config_templates {
t_repo = repo;
}
}
// Rewrite file using found repository, this is done to clean up errors on the file or insert default values
write_sources(&s_repo, &t_repo, file)?;
// Return repos
Ok((s_repo, t_repo))
}

Otherwise it might be a good idea to have something like --ignore-errors, which ignores errors like the 404 and just does what it can.

or simply integrated into flavours however I see the author was made aware of this quite some time ago and seems uninterested?

In my opinion that would be kind of out of scope for flavours.
Having functionality to configure where the sources come from. Sure.
Managing the sources itself. Not really.

Would a PR be merged?

I can't speak for the maintainer, but I would guess that while it might take a while, that yes.

from flavours.

MrPenguin07 avatar MrPenguin07 commented on June 13, 2024

Indeed, ideally this external list should be forked and under flavours control (considering a simple 404 on this list breaks initial setup here!)

You can actually do that yourself! While it is not really documented, you can override the default by either

* setting `schemes`/`templates` in the `config.toml`

* setting `schemes`/`templates` in `$XDG_DATA_HOME/flavours/base16/sources.yaml` (defaults to `$HOME/.local/share/flavours/base16/sources.yaml`)

See the get_sources function:

https://github.com/Misterio77/flavours/blob/884dadcceaad141b33f68155dc7f4b7eb472b1b9/src/operations/update.rs#L46-L98

Otherwise it might be a good idea to have something like --ignore-errors, which ignores errors like the 404 and just does what it can.

or simply integrated into flavours however I see the author was made aware of this quite some time ago and seems uninterested?

In my opinion that would be kind of out of scope for flavours. Having functionality to configure where the sources come from. Sure. Managing the sources itself. Not really.

Would a PR be merged?

I can't speak for the maintainer, but I would guess that while it might take a while, that yes.

Ofcourse it can be done by oneself. That's not the issue.

The issue is that new users are being hit with this upon install, and spending who knows how long figuring it out.
Then hacking their way around it to get it working.

The correct solution is as I stated previously.
It's a very quick 'fix' - for an otherwise interesting project seems odd the author hasn't done so or nominated someone else.

Nb. not intended to be an attack on the author. We are free to fork and whatnot and thanks for your work thus far.

from flavours.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.