Fork me on GitHub
#boot
<
2015-06-23
>
podviaznikov00:06:01

I’m calling boot build-jar and then boot push and getting error java.lang.Exception: missing jar file or repo not found.

podviaznikov00:06:59

Is this configuration correct?

(set-env!
  :source-paths #{"src"}
  :resource-paths #{"src" "resources"}
  :wagons       '[[s3-wagon-private "1.1.2"]]
  :repositories #(conj % '["private-repo" {:url ""
                                           :username "---"
                                           :passphrase "---"}])…

micha00:06:35

podviaznikov: you need to tell the push task which repo to push to

micha00:06:56

i think you can do like this

micha00:06:07

boot build-jar push --repo private-repo

micha00:06:57

podviaznikov: i wouldn't have "src" in both :source-paths and :resource-paths

micha00:06:46

:source-paths and :resource-paths should be disjoint

podviaznikov00:06:56

I think that worked (I can see file in s3 now). Thanks @micha! Thanks for the tip with :source-paths and :resource-paths

micha00:06:46

just made an issue to add a warning about that

podviaznikov03:06:57

one more question about using s3-wagon. So I was able to push to s3 my project when I hardcoded :username and :passphrase. But when I do

:username (System/getenv "AWS_ACCESS_KEY")
                                            :passphrase (System/getenv "AWS_SECRET_KEY”)
it fails with No matching ctor found for class org.sonatype.aether.repository.Authentication. Any tips?

mitchelkuijpers09:06:45

Hi all I have some trouble with boot-reload it does not seem to reload my css file 😞 I have this config:

mitchelkuijpers09:06:49

(reload :asset-path "public")

mitchelkuijpers09:06:08

and my css file is in

resources/public/css

mitchelkuijpers09:06:02

and just for completenes

<link href="css/main.css" rel="stylesheet" type="text/css" media="all">

martinklepsch09:06:18

@mitchelkuijpers: do you get “Reload” messages in the browser console?

martinklepsch09:06:03

@mitchelkuijpers: if you expand that message you should see the paths it’s trying to reload

mitchelkuijpers09:06:19

Reload
reload.cljs:60 css/main.css

mitchelkuijpers09:06:23

the path seems correct

mitchelkuijpers09:06:20

I am running in an Iframe if that might be related, cljs reloading works like a charm

martinklepsch10:06:56

Not really any good ideas then. Any errors in Network panel?

mitchelkuijpers10:06:09

No I don't see it doing any requests

martinklepsch10:06:25

Even if CLJS changes?

martinklepsch10:06:38

Make sure your filter is set to “All"

mitchelkuijpers10:06:16

but my base-url is pretty weird maybe that helps?

martinklepsch10:06:39

So to recap: your cljs reloading works fine but CSS does not. A message is sent to the browser window correctly and no errors are visible in the network panel but changes in CSS have no effect?

mitchelkuijpers10:06:31

cljs works perfectly

martinklepsch10:06:11

Are you sure the contents of the CSS file actually changed?

mitchelkuijpers10:06:13

Aha maybe the asset path option only works with js?

mitchelkuijpers10:06:26

Yes 100% even checked the target folder to see if the changes propagated there

mitchelkuijpers10:06:34

and when i refresh i see the changes

mitchelkuijpers10:06:13

No I was just reading the code, and the path it sends is correct

martinklepsch10:06:31

Probably best to open an issue then. Then things also don’t get lost in Slack simple_smile

martinklepsch10:06:12

And I think describing your setup (iframe etc) is critical.

mitchelkuijpers10:06:14

I think i found it

martinklepsch10:06:17

oh cool. What was it?

mitchelkuijpers10:06:24

Will make a pull request when i am sure

mitchelkuijpers10:06:37

(defn- changed-href? [href-or-uri changed]
  (when href-or-uri
    (let [uri  (goog.Uri. href-or-uri)
          path (.getPath (.resolve page-uri uri))]
      (.log js/console "path" path)
      (.log js/console "changed" (first changed))
      (.log js/console "ends-with?" (ends-with? path (first changed)))

      (when (not-empty (filter #(ends-with? % path) changed))
        uri))))

mitchelkuijpers10:06:43

something seems to go wrong here

mitchelkuijpers10:06:17

path /css/main.css
core.cljs:340 changed css/main.css
core.cljs:341 ends-with? true
core.cljs:343 ends-with-original false

mitchelkuijpers10:06:21

some debug loggin

mitchelkuijpers10:06:53

I still find it weird because it works for js..

mitchelkuijpers10:06:51

The problem is that the path get's normalized but the changed files don't get normalized, shall I make a pull request?

martinklepsch11:06:12

@mitchelkuijpers: if you have a fix that you think won’t break other people’s code a PR is great simple_smile

mitchelkuijpers11:06:20

@martinklepsch: I don't think it will break other people's code 😅

danielsz17:06:29

I wanted to search this room, but Slack tells me “Some older messages may not be shown because your team has over 10,000 messages”

danielsz17:06:40

There is a link which leads to pricing

danielsz17:06:59

I think we call this vendor lock-in.

danielsz17:06:18

People, Slack is not an IRC replacement.

alandipert18:06:31

@danielsz: of course, IRC retains 0 messages and we can't even pay money to search more simple_smile

danielsz18:06:13

alandipert: haha, yeah, that’s true.

alandipert18:06:50

true, also we can easily run our own archiving bot

voxdolo18:06:52

There's a bot archiving stuff here too… and a web UI for searching it. no link handy though 😕

danielsz18:06:19

welcome akiva

micha18:06:28

it would be cool to have the log url in the topic

akiva18:06:36

Heya, Daniel!

danielsz18:06:03

voxdolo: a global one or room specific?

voxdolo18:06:42

If I could find the link, I could tell you 😄 I'm searching slack archives trying to find a link to the clojurians archive… so meta.

danielsz18:06:14

voxdolo: cool, that second link should be pinned here so that people know how to search the archives.

arrdem18:06:14

alandipert: I've been playing with the idea of an irc/slack bridge... but it seems like solving the problem the wrong way.

arrdem18:06:40

a more slack-like IRC client would probably be the "realer" answer than having a bridge bot.

alandipert18:06:44

that would be cool too

arrdem18:06:54

The real issue is that there isn't a good way I've found to "connect" to IRC from the usual stack of web technologies... you need some sort of bridge server

arrdem18:06:24

or at least that's been my impression in taking a cursory look at the "problem".

alandipert18:06:27

the appeal of slack over irc to programmers is a mystery to me, but i'm happy to roll with it

arrdem18:06:11

I mean... doge

multi
     line
         codez
what's not to love

akiva18:06:17

Heh, I actually prefer Slack but I think that most has to do with much of my late-90s IRC experience being caught up with endless netsplits, fighting for your nick, having to have a bounce set up, etc.

akiva18:06:33

I still have EFNet flashbacks.

martinklepsch18:06:49

I want something fully distributed with persistence.

martinklepsch18:06:23

(i.e. https://github.com/moose-team/friends — immature but right direction imo)

alandipert18:06:11

oh cool, a kind of open gitter

arrdem18:06:32

maybe that was it... I've seen a couple fully distributed pre-alpha slack clones floating around

martinklepsch18:06:51

I’m hoping that with all this blockchain stuff out there it’s just a matter of time until this stuff finally becomes feasible.

alandipert18:06:16

i suppose a chat thing could be made the same way as that guy's blockchain + bittorrent concept

arrdem18:06:24

You don't need a blockschain for this... a simple vector clock will do

alandipert18:06:26

keep HEAD in the blockchain and blobs on bittorrent

alandipert18:06:44

er, distributed github concept

martinklepsch19:06:33

@arrdem: I think you might want one though for name resolution etc

arrdem19:06:53

@martinklepsch: yeah namecoin is pretty awesome for stuff like this.

arrdem19:06:39

it's just an enormous overhead relative to a chat service to bake it into the block chain and deal with block times IMO.

arrdem19:06:50

grumble grumble message latency

martinklepsch19:06:54

@arrdem: I really don’t know much about bitcoin but reading that IPFS paper the other day I found the ideas for incentivizing nodes to share data really interesting and I assume you can model that kind of stuff with things like Ethereum

martinklepsch19:06:29

> deal with block times IMO can you elaborate?

martinklepsch19:06:43

would data only be transmitted when blocks are “found”(?)

arrdem19:06:03

@martinklepsch: so the whole reason that bitcoin has blocks and mining is to achieve distributed consensus in a truly trust free manner. since the hashing algorithm is presumed to have no inverse function everyone has a "chance" of finding a block proportional to their fraction of the network compute power this meaning that people can't just forge bogus transaction blocks willy nilly. this is a hugely expensive integrity property which is frankly overkill for most applications since it is quite literally a universal stop and synchronize operation with a node randomly elected by the hashing race as the synchronization point. you need this level of integrity for stuff like identities, money and packages, but for sending messages from A to B in an informal context like IRC/Slack it's just engineering overkill to do the blockchain thing forget performance inefficient.

arrdem19:06:33

Unlike financial or naming transactions, IRC is valuable even if it's lossy or if we have a relatively short buffer of "history". We don't need a strong global eternal log.

arrdem19:06:49

for IRC being a meta-name for a chat system.

martinklepsch19:06:11

interesting, I thought these kind of properties could be adapted to use case depending on how the chain is setup etc. In any case I’ll need to read more in order to be able to contribute to this discussion 😝

arrdem19:06:14

All you really need is to know what message a message came after. Then you can do an N-way merge between arbitrarily many chat histories unlike bitcoin financial transactions or naming transactions where order matters because of the possibility of overspending.

arrdem19:06:28

😛 sorry I'll stop now. I have some friends who are hardcore bitcoin will save the world madmen and so this is my well practiced argument that bitcoin is overkill.

martinklepsch19:06:57

Nah, I appreciate your perspective simple_smile

martinklepsch19:06:47

Would probably be interesting to see how the aforementioned Slack clone handles distributed (trustless) persistence.

arrdem19:06:32

Could be a really fun hackathon project to try and build a trusted vector clock chat system..

arrdem19:06:01

Rather than not trusting nodes, you require all nodes to have a trusted centrally issued key which can be revoked by an "admin". Messages from bad keys or revoked keys get dropped, other messages get persisted in a receive order vector clock and propagated to all other nodes.

jballanc19:06:46

Slightly off-topic, but is anyone here knowledgable about boot-datomic? I ask because I’ve done similar stuff (reverse-engineering the datomic utilities) in the past, but I’ve never heard from the Datomic team how “kosher” the approach is...

danielsz21:06:26

arrdem: +1 for your "Bitcoin is overkill for a chat system” argument . Loved it.

danielsz21:06:38

Well argued.

alandipert21:06:37

there is an awesome blog post there!

jballanc21:06:52

@alandipert: only if it’s implemented in JavaScript

alandipert21:06:02

preferably ES6, but yes 😉

jballanc21:06:13

ES6 with promises

podviaznikov22:06:54

I’m running boot build on https://github.com/hashobject/blog.hashobject.com/blob/master/build.boot (and some variations). What I see that all tasks are working but my target directory is empty. I assume that all files from :resource-paths should be copied over to the target directory. That was working before yesterday (I did some experiment https://github.com/upworthy/heroku-buildpack-boot/issues/2). Now I’m having trouble understanding how to fix my local setup. Any tips?

micha22:06:12

podviaznikov: the :target-path issue is happening only on heroku?

micha22:06:24

or locally also?

podviaznikov22:06:16

right now locally too. I assume that happened after I run ~/a/bin/compile your-boot-project ~/a/test-cache ~/a/test-en from buildpack locally. But not 100% sure

podviaznikov22:06:43

I also tried to reinstall boot today. and it didn’t help

micha22:06:52

is it possible that another instance of boot is trying to write to the target at the same time?

podviaznikov22:06:30

let me check my terminal tabs

podviaznikov22:06:24

I don’t think I have other boot. Killed java processes and tried again - same issue

micha22:06:20

the only reason it wouldn't write to :target-path is if no task generated a file

micha22:06:50

like if all tasks simply pass files through it won't touch the target

micha22:06:04

this is to have tasks like repl and so on work as you'd expect them to

micha22:06:31

but it looks like your tasks are generating plenty of files

podviaznikov22:06:57

ok, one sec. I had some task that were generating files commented out (for debugging). But I was still expecting boot to copy everything from resources into target

podviaznikov22:06:06

right now it works.

podviaznikov22:06:16

let me check if I can reproduce initial issue

micha22:06:14

you wouldn't expect the target dir to be emptied out when you do boot repl for instance

micha22:06:47

so it's a little tricky to know exactly what the correct behavior for boot should be

micha22:06:53

regarding the target dir

micha22:06:26

currently it only syncs the target dir if a task in the pipeline created a new file that wasn't already in the fileset

micha22:06:03

i think you might want to do debugging in the classpath

micha22:06:08

instead of from the target dir

micha22:06:30

like the serve task there is, i believe, serving from the classpath, which doesn't have these strange issues

micha22:06:15

you can use the sift task, too, to split some files off for debugging, and show -f

micha22:06:41

like if you were looking in the target dir for the presence of absence of files you could totally use show -f instead

micha22:06:51

and this will work in all cases

podviaznikov22:06:21

those are all good advices. Going to check server task implementation.

podviaznikov22:06:28

I think I narrowed down my problem

podviaznikov22:06:52

seems like the problem with my s3-sync task. When it’s included target would be empty. If I remove it - everything works. So I found a person to blame:)

podviaznikov22:06:58

and what happened while debugging this issue I commented out all task that created files -> and target directory was again empty. So I thought that I broke target directory completely

micha22:06:27

if you can think of a better way to handle the target dir we can try it

micha22:06:59

unmanaged shared state is hard to get right in all cases simple_smile

podviaznikov22:06:04

no, that is completely fine for me since I know how it works now

podviaznikov22:06:42

thank you for your help

arrdem23:06:14

Is build processes involving multiple nested snapshot builds not a flagship boot use case?