-
Notifications
You must be signed in to change notification settings - Fork 14
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 a binary? #50
Comments
For reference, the reason for the current approach was that it is relatively easy to use across platforms and without any particular additions to the TeX system in use. In particular, I'm not sure how one deals with 'local' installs for an executable (can't just go in |
Hmm, I see what you mean for local installs. I guess if the wrapper is simple enough then we shouldn't need to change it much; e.g., something like
is ‘enough’ for the dead-simple use case. Anything dealing with new options can still be written as I also hadn't considered the Windows side of things. I suppose that makes the whole effort more difficult... |
If you have
#!/usr/bin/env texlua
at the top of the build.lua file and make it executable you can use
./build.lua
instead of
texlua build.lua
so you don't really need a separate executable, you don't need the lua
extension so you could call it
./foobuild
instead (not ./build though unless you change the default build directory:-)
the #! probably doesn't do anything in the windows shell, but it doesn't
stop its use as texlua foobuild
…On 23 January 2018 at 22:18, Will Robertson ***@***.***> wrote:
Hmm, I see what you mean for local installs. I guess if the wrapper is
simple enough then we shouldn't need to change it much; e.g., something like
#!/usr/bin/env texlua
dofile("build.lua")
is ‘enough’ for the dead-simple use case. Anything dealing with new
options can still be written as .lua files installed in texmfhome and
loaded using the kpse library. I don't know what is needed from the TeX
Live / CTAN perspective to indicate a programme to be installed in the bin
directory though!
I also hadn't considered the Windows side of things. I suppose that makes
the whole effort more difficult...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABNcAjOLBf0fOzRF5BMWNTZiUdH9t1sxks5tNlqugaJpZM4RpLLj>
.
|
Yes, for that level of convenience I agree having a separate binary offers little benefit — for me, I think an easier approach is to have a bash alias set up as Any advantage of a binary would be that users don't need to write their own I know right now it's not hard! But every little bit helps I think. Additionally, I think it's an easier sell to tell people to just run |
Am 23.01.2018 um 23:37 schrieb Will Robertson:
Additionally, I think it's an easier sell to tell people to just run
|l3build ctan|.
not sure in my opinion. I think it is an easy sell to tell them
texlua build.lua ctan
and tell them **this works on any platform for you**
the only thing that bugs be about the above is that our standard file is
called build.lua and we have by default a "build" directory meaning you
can't autocomplete on shells
I think the platform independence is a goods thing and defining a shell
wrapper or alias or anything depending on your system and depending on
how often you use this is simple enough (we could provide a short
section with examples for this if you really think that is that helpful)
|
Well, you actually have to tell them:
* first create a file called build.lua and populate it with
module = ‘foo’
kpse.set_program_name("kpsewhich")
dofile(kpse.lookup("l3build.lua”))
* *then* run `texlua build.lua` and this works on any platform
But maybe I’m overthinking this. If everyone is happy with the current approach, no need to add additional complexity.
Frank’s suggestion to add something to the docs about this is a good one.
I’ll leave this open and close when I do so.
* * *
Should we think seriously about changing the default `build` directory name to help with autocomplete and possible name clashes?
|
I'm on Will's side. If providing a cross-platform executable with
"init" capability is easy enough, that is.
|
On the requirement for a If we want to go down the binary route, I'd suggest we talk with the TL people and with Christian Schenk, and get |
Yes, agreed.
Maybe I wasn’t quite clear enough about why I thought this would be a good idea. It’s not to simplify or change the way that l3build currently works today. To have it do anything meaningful, you would still need a `build.lua` file in the module folder.
(Well, you could have the equivalent of
module=os.execute("basename `pwd`”)
and then have all other variables as default… but while that might be neat, it's not where I was aiming at.)
I see two main advantages to a “binary”:
1. New user comes along, says “I hear l3build is really great” and then types in `l3build` into a command line; something sensible happens like:
No build.lua file found. Generate one by typing `l3build init` or type `l3build help` for more information.
This is somewhat analogous to typing `make` in a random directory. Providing sensible defaults is one good thing. Providing an easy-to-use template for a user to follow is, I think, an even better feature to add for a general tool.
2. For lazy people like me. I know how to run l3build and want to create a new build.lua script every other week. At the moment, because I’m lazy, I just copy/paste one that’s lying around somewhere. But that’s not very fun. For me, being able to write `l3build init` would save me time and headspace.
(Okay okay, after all this I’ll probably write my own little script to do this in the mean time. But I’m sure it’s not just me that would benefit from it!)
|
If we want to go for this we should make the decision: it will need some reworking of how existing |
On 5 February 2018 at 09:35, Joseph Wright ***@***.***> wrote:
If we want to go for this we should make the decision: it will need some
reworking of how existing build.lua files work (both the 'load the core'
line and the variable setting will need to change). Should we ask the
distro people about how easier it would be for them to add the necessary
wrappers?
—
what does make4ht look like on windows texlive? on cygwin/linux it is just
a lua script in the bin directory, with first line
#!/usr/bin/env texlua
-- Package make4ht. Author Michal Hoftich <michal.h21@gmail.com>
-- This package is subject of LPPL license, version 1.3
kpse.set_program_name("luatex")
so it executes via texlua.
Does it have a binary executable wrapper for windows, or a .bat file or...?
David
|
@davidcarlisle At least in TeX Live it's a wrapper |
The biggest single issue would be that we'd need a new Overall, this might well be a good idea now we are getting wider take-up of |
I notice that |
Unless I hear otherwise, I'll start on this shortly, probably first by adjusting where the script installs to, then branching for a version that is intended to run directly not by running the |
@josephwright — does the logic have to change or do you just think it's a good time to streamline things? I was thinking more that you might have something like
and then everything continues as it currently does. Is that too clunky, do you think? |
@wspr The problem there is that current We also gain an opportunity to tidy up some of the load order stuff with a binary: it loads first so we get More widely, I guess I'd like a single approach. Looking at the needs for a binary, they are actually pretty small. So we could make everyone's life easier and be able to do
or similar 'universally'. Would be good learning experience for any future format (where a ConTeXt-like sctipt is I think a must). |
@josephwright — not complaints from me on a reordering of the loading order and so on; I just wanted to make sure. I agree it makes life easier for certain parts of the code. Good point about the ConTeXt-like script! I would always want a default "just run it once", I think, but it make sense to build support in for code to indicate when it needs a re-compile, with a matching tool to make it all happen. |
Unless I hear otherwise, I'll start on this shortly
I don't have much of an opinion on this topic so please go ahead if you
think this is the right move.
It would be good though (I think) if there remains a fallback using only
core luatex to process in the future.
|
@FrankMittelbach To be clear, a binary here is only needed for Windows and is a stub: what we are really talking about is allowing
with the biggest actual alteration being that you then have a fixed name for the config script (more like |
Having just started a few new projects I now see a different "need" for the binary (already mentioned in @wspr original issue): the ability to start a project without the need to write a
most of the args could be default, eg mail and name could be This way one could get with a single line a while template structure being build with basic test files, .ins file proper license info etc etc I think this would be really valuable. |
@FrankMittelbach OK, as we are in the TL freeze period we have a window to do this: I'll action. |
The core actions required here are:
|
looks good to me |
I'll probably branch for all of this: I'd rather have somewhere 'safe' to work on the changes. Two areas to note on |
I'll probably branch for all of this: I'd rather have somewhere 'safe'
to work on the changes.
sounds sensible
Two areas to note on |build.lua|. First, I think we can pick up both
current and 'new' usage (so |texlua build.lua| /versus/ |texlua l3build|
or just |l3build|.
guess so. one needs to clearly define what what incarnation is supposed
to do then I guess it falls into place more or less
l3build -- display usage
l3build --<setup-options> -- setup a new data structure including
build.lua, testdir etc
l3build <goal> <options> -- like texlua build.lua <goal> <options>
if build.lua is in the current dir
etc
Fingers-crossed this will keep the current behaviours but also allow
better set ups for other stuff.
:-)
|
@FrankMittelbach I was thinking you'd have |
yes right you are, but that makes it even simpler I guess (except that init should balk if there is already a structure of some sort) |
The first two points of my list are done: they are by far the most important. I think everything still works: could some other people check? Are we happy sticking with a hard-coded config name of |
Am 06.03.18 um 08:51 schrieb Joseph Wright:
The first two points of my list are done: they are by far the most
important. I think everything still works: could some other people check?
I removed the load of l3build in my local build file to see if that works.
but how do you set up l3build to actually work (on OSX)?
after texlua l3build install it ends up in a local scripts dir but that
is not in any path nor would that file be executable if it is
had to do
texlua `kpsewhich l3build.lua` check
which then looked like it worked.
Are we happy sticking with a hard-coded config name of |build.lua|. I
note that things like |make| use a fixed name: I suspect we are fine but
at least want to check. (We have the |--config| option but that's really
meant for something subtly different, though doubtless we use it as an
override if required.)
I think a fixed name is fine
I'm still a bit unhappy about the fact that "build.lua" is an important
part of your project (should not be deleted) but "build" directory is a
somewhat tmp object. It is less of a problem as you do no longer need
"build-lua" in your command line once this is allready but still ...
|
@FrankMittelbach On 'how will this work', we are in a 'flux' state just at the moment. If you run On the |
This is the first key step to making a stand-alone script. Note that one now needs to do "texlua l3build" or similar. Various bits and pieces outstanding!
This should allow both forms of usage, for the present, but without having to reload files.
We will still need to work on this, for example once l3build can be run by name.
Am 06.03.18 um 10:16 schrieb Joseph Wright:
On the |build/| directory, we could just change the standard name to say
|tmp/|.
wouldn't call it tmp as that may be already used (well I do often)
perhaps tmpbuild if we want to change at all. as i said, once we really
use l3build <target> there isn't much problem left
|
I think we are good to go: just need a man page (so we can do a prerelease already). If everything looks OK I'll merge. |
can't see why not (after understanding why it didn't work here due to version mixup in the local tree) |
This is the first key step to making a stand-alone script. Note that one now needs to do "texlua l3build" or similar. Various bits and pieces outstanding!
This should allow both forms of usage, for the present, but without having to reload files.
We will still need to work on this, for example once l3build can be run by name.
Everything should now be in place: I'll get to CTAN to see what issues come up in pre-testing. Probably we want to set a sunset period for the older approach: various bits of the code can be simplified if we don't need to support loading |
Everything should now be in place: I'll get to CTAN to see what issues
come up in pre-testing.
good work, thanks
Probably we want to set a sunset period for the older approach: various
bits of the code can be simplified if we don't need to support loading
|build.lua| 'early'.
we probably need to allow for the older approach for a good while
|
Sure: was thinking at least a year. I mainly wanted to flag up that there are reasons we might want to consider this longer-term. |
Logging this here for further discussion or just so I remember; no urgency.
I think there might be some benefit for us to distribute a script called
l3build
with chmod+x to more easily document (and add some features) that behaved essentially liketexlua build.lua
but with some extra possibilities.Benefits:
l3build init
which could generate a localbuild.lua
file (a definite plus from my perspective)l3build newproject
which could generate a set of template files in a “standard form” that fits our view of best practice (not sure we could ever agree on this but might be a nice idea...)None of these are show-stoppers, really, but I do think it would be nice for new users to be able to head to their command line and write
l3build
and have something sensible happen, even if it's just a sensible error message like what current happens when you writetexlua build.lua
— the main thing being that you wouldn't already need to have abuild.lua
file in the current directory!The text was updated successfully, but these errors were encountered: