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

Provide options for V2 cli to override the default bundle_url #1002

Closed
Sinofine opened this issue Feb 8, 2023 · 2 comments · Fixed by #1132
Closed

Provide options for V2 cli to override the default bundle_url #1002

Sinofine opened this issue Feb 8, 2023 · 2 comments · Fixed by #1132
Labels
good first issue A good issue for new contributors to try tackling!

Comments

@Sinofine
Copy link
Contributor

Sinofine commented Feb 8, 2023

When we use tectonic -X new or tectonic -X init to initiate projects, the output is as follows.

note: "version 2" Tectonic command-line interface activated
note: creating new document in directory `xxxx`
note: connecting to https://relay.fullyjustified.net/default_bundle.tar
note: resolved to https://data1.fullyjustified.net/tlextras-2020.0r0.tar

It seems that the url is hard coded in

pub fn get_fallback_bundle_url(format_version: u32) -> String {
// Format version 32 (TeXLive 2021) was when we introduced versioning to the
// URL.
if format_version < 32 {
"https://relay.fullyjustified.net/default_bundle.tar".to_owned()
} else {
format!("https://relay.fullyjustified.net/default_bundle_v{format_version}.tar")
}
}

and the config is default using that source

tectonic/src/config.rs

Lines 194 to 202 in 8bf8da7

impl Default for PersistentConfig {
fn default() -> Self {
let url = tectonic_bundles::get_fallback_bundle_url(tectonic_engine_xetex::FORMAT_SERIAL);
PersistentConfig {
default_bundles: vec![BundleInfo { url }],
}
}
}

The source listed above is acceptable for daily usage, but for users in an internal network without access to internet, they may use mirrors or local copy for bundles. However, the command tectonic -X new or tectonic -X init themselves are default using the hard-coded bundle url to complete initiation, which is meant if the default url is not accessible then the initiation won't be accomplished (usually we waits for minutes and then it throws connection errors and fails).

In the V1 cli, it provides --web-bundle to override the default, but in the newer V2 cli, the option is absent. If we provide the option for tectonic -X new and tectonic -X init, it may be nicer for people unable to access the default bundle url.

@pkgw pkgw added the good first issue A good issue for new contributors to try tackling! label Feb 11, 2023
@pkgw
Copy link
Collaborator

pkgw commented Feb 11, 2023

Yes, this is a good point. This should be a fairly straightforward improvement for someone new to the project to implement, I'd hope, so I'll tag as such!

@bryango
Copy link
Contributor

bryango commented Dec 15, 2023

I came up with a fix for this in #1132. Please see if it's okay!

@pkgw pkgw closed this as completed in #1132 Feb 4, 2024
pkgw added a commit that referenced this issue Feb 4, 2024
`--web-bundle` for v2 CLI: fix #1002 and allow overrides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good issue for new contributors to try tackling!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants