Skip to content

Expand variables in install stanzas #690

Closed

Activity

  1. added
    good first issue
    on Apr 10, 2018
  2. Isweet commented on Jun 30, 2018

    @Isweet

    I've started poking at this, but first issue w/ Dune so it'll be slow. Feel free to scoop me for the sake of expedition.

  3. rgrinberg commented on Jun 30, 2018

    @rgrinberg
    MemberAuthor

    Thanks for taking intitative @Isweet .

    Have a look at jbuild.ml. In particular, you're looking for uses of String_with_vars.t uses in the various t values which represent sexp parsers. This will you insert variables in the necessary fields.

    Then, you'll be to eliminate String_with_vars.t values using String_with_vars.expand with a correct ~f function. Here you can refer to the expand_* family of functions in super_context.ml

    Finally, keep in mind that we cannot support all variables in the installed stanza. For example, %{read:...} cannot be supported at the moment, because we're keeping the list of installed artifacts static, and hence cannot build anything before we know the full set of static artifacts.

    Feel free to ask more questions.

  4. Isweet commented on Jun 30, 2018

    @Isweet

    I was able to figure out the parsing yesterday. I'll open a WIP PR sometime today.

    I started looking at the expand functions in super_context.ml to get an idea of how to use expand in string_with_vars.ml.

    Thanks for the direction, I'll follow-up if I get stuck.

  5. rauanmayemir commented on Jul 23, 2018

    @rauanmayemir

    Has anything changed here recently?

    I can compile an executable in (exe) linking mode and run it as a standalone program, but I can't link app.exe.o built in (object) mode with my XCode project because it has its own libasmrun.a dependency. (i.e I start having 'duplicate symbol' issues)

    I can't remove libasmrun.a dependency in my xcode project because I'm running caml_main in its main function.

    I didn't have such issues before, so I'm wondering if something changed in -output-complete-obj.

    My jbuild file:

    (jbuild_version 1)
    
    (executable (
     (name app)
     (libraries (brisk_cocoa))
     (modes (object))
    ))
    
    (install (
      (package brisk)
      (section lib)
      (files ((app.exe.o as app.o)))
    ))
    

    And then I run jbuilder build @install.

    Note: I'm on ocaml 4.06 and jbuilder 1.0.1.

  6. rauanmayemir commented on Jul 30, 2018

    @rauanmayemir

    @diml I created a discuss thread here, should I open a gh issue as well?

  7. rgrinberg commented on Dec 21, 2018

    @rgrinberg
    MemberAuthor

    Fixed by @mseri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions