< 192020-12-20⋎21 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
05:16symbioquine[m]Ignoring the question of whether it's worthwhile to implement support for complex queries like these, I'd welcome any feedback about whether there's a better way to do this; github.com/symbioquine/farmOS_wfs/blob/7
14:37*margoaron has joined
14:41*_margoaron has joined
14:42*margoaron has quit (Ping timeout: 264 seconds)
16:08symbioquine[m]<mstenta[m] "symbioquine: XDebug ALSO updated"> Do you still have a link for these environment var changes handy? I seem to remember XDebug just kind of working for me in the past...
16:09mstenta[m]yes! one sec...
16:09symbioquine[m]No rush :)
16:09mstenta[m]github.com/farmOS/farmOS/blob/32effe4dc6
16:09mstenta[m]i updated the dev docker-compose.yml template to include them
16:09mstenta[m]and the docs:
16:10mstenta[m]2x.farmos.org/development/environment/de
16:10mstenta[m]and here's the diff: github.com/farmOS/farmOS/commit/9bb7d4f8
16:11mstenta[m]took some fiddling to figure it out, but i think it makes sense... lemme know if you have trouble
16:11symbioquine[m]Should I infer that those changes aren't expected to be needed with the 7.x-1.x devel image?
16:11mstenta[m](the one that's easy to miss is `remote_host` is now `client` inside the `XDEBUG_CONFIG` env var)
16:12mstenta[m]correct - at least i think that's true... i think we only updated in the 2.x image
16:13symbioquine[m]I seem to remember Eclipse just kind of auto-magically connecting to XDebug - even though I wasn't using it. Now I'm trying to use it, I can't seem to get that to happen... grrr :)
16:13symbioquine[m]I'll check the IP thing.
16:15mstenta[m]yea it was frustrating to get it working again for me
16:15mstenta[m]check your xdebug version to see if you're on 2/3
16:15mstenta[m]they also changed the default port from 9000 to 9003 (eye roll emoji)
16:18mstenta[m]I use PHPStorm, and they published a blog post about the change, which was helpful
16:18mstenta[m]blog.jetbrains.com/phpstorm/2020/11/phps
16:19mstenta[m]PHPStorm listens on both 9000 and 9003 by default now
16:19*sent a long message: < matrix.org/_matrix/media/r0/download/mat >
16:19mstenta[m]oh dang. that's 7.x-1.x image?
16:19mstenta[m]:-(
16:20mstenta[m]wonder if we can just pin it to v2
16:20mstenta[m]github.com/farmOS/farmOS/blob/42a8a730ad
16:20symbioquine[m]<mstenta[m] "oh dang. that's 7.x-1.x image?"> Yes, the only special thing is I'm using a version I built including github.com/farmOS/farmOS/pull/385
16:21mstenta[m]yea - makes sense that it would be using xdebug 3 now too... we're basically just doing `pecl install xdebug`
16:21mstenta[m]this was a pretty disruptive change IMO
16:22mstenta[m](@paul121 said he saw a lot of stackoverflow posts flooded in when they did it too - so we're not alone)
16:22symbioquine[m]I think we just need to change that to something like `pecl install xdebug-2.9.8`...
16:22symbioquine[m]I'll try it...
16:23mstenta[m]awesome - yea i say we just pin 7.x-1.x on xdebug 2 and move forward with xdebug 3 for 2.x
16:24symbioquine[m]As long as there aren't too glaring of security problems I suppose
16:26mstenta[m]yea
16:26mstenta[m]although if it's just in the dev image that's not too critical
16:29*sent a long message: < matrix.org/_matrix/media/r0/download/mat >
16:29symbioquine[m]I'll send a PR...
16:29mstenta[m]woo hoo!
16:29mstenta[m]thanks symbioquine
16:30symbioquine[m]Well I haven't tested that it fixed XDebug for me yet... I guess I should do that too...
16:30symbioquine[m]it did
16:30mstenta[m]huzzah!
16:32mstenta[m]> Ignoring the question of whether it's worthwhile to implement support for complex queries like these, I'd welcome any feedback about whether there's a better way to do this; github.com/symbioquine/farmOS_wfs/blob/7
16:32mstenta[m]PS this is awesome!!
16:32mstenta[m]Using EntityFieldQuery makes sense to me!
16:32symbioquine[m]Thanks!
16:33mstenta[m]And with regard to 2.x... EntityFieldQuery goes away... but the native entity API is basically the same thing - and even better IMO
16:33mstenta[m]EntityFieldQuery in D7 was sort of a bolt-on after thought
16:33symbioquine[m]I was figuring it would be something like that.
16:33symbioquine[m]Needs to be something filling that niche.
16:34mstenta[m]yea - and i'd be happy to help translate these with you for 2.
16:34mstenta[m] * yea - and i'd be happy to help translate these with you for 2.x
16:35mstenta[m]i'm working on the asset location logic right now in my `2.x-location` branch - coming along nicely!
16:35symbioquine[m]yay!
16:38symbioquine[m]github.com/farmOS/farmOS/pull/391
16:41mstenta[m]symbioquine: Drupal 9 uses Symfony's service container, which could be a really nice way for us to have "swappable" geometry logic - to leverage PostGIS if/when it's available
16:42mstenta[m]eg: i could imagine a service (which is just a class w/ interface) that has the `EntityFieldQuery` code you're working on
16:42mstenta[m]and a `postgis` module that, if enabled (only if you have postgis), replaces the service class with another one, which uses direct postgis queries instead
16:43symbioquine[m]Yeah, makes sense
16:43mstenta[m](maybe just one way of doing it... probably others)
16:43mstenta[m]i'm basically going to use that approach with the "Group" logic
16:43mstenta[m]eg: we'll have an `asset.location` service for getting an asset's current location/geometry
16:44mstenta[m]and if the `group` module is enabled, it will replace the class with one of it's own, which also takes into account asset group membership
16:44mstenta[m](that's the current thought anyway - i think it will work)
16:45symbioquine[m]It's a decorator I assume?
16:45symbioquine[m]i.e. checks for a "group location" and if there isn't one, it delegates to the original location service?
16:45mstenta[m]yup!
16:46symbioquine[m]cool!
16:46mstenta[m]in theory :-)
16:46mstenta[m]this will solve the weird conundrum we have right now where an asset can have movements, and also be in a group with movements (where is the asset??)
16:47mstenta[m]the thought is: it will basically include the group's movement logs, so whichever one is the "latest" will take precedence in determining location
16:47mstenta[m]so you could still move an asset separately from a group, while still being part of the group
16:47mstenta[m](eg: if a cow gets sick and moves to quarantine or something, but is still a member of the herd)
16:47symbioquine[m]ah, yeah that would get a bit tricky to do in the decorator pattern.
16:48mstenta[m]mm yea... might need to think it through some more... getting there :-)
16:48mstenta[m]the location stuff i'm working on now is the bulk of the work... hopefully adding the group logic next will be easier
16:48symbioquine[m]Maybe instead of the service being a "location service" it's a movement history service?
16:49symbioquine[m]So the decorator can modify the query results to add it's own history events...
16:49mstenta[m]ah hmm yea that's an idea
16:50mstenta[m]actually that's not too far off from what i have
16:50symbioquine[m]nice
16:50mstenta[m]i actually have a location service and a general purpose log query service
16:50mstenta[m](location service is ALSO used for "fixed" assets, so movements aren't always part of that logic)
16:52mstenta[m]and so: yea... maybe the log query service (or an extension of it) can become a more general purpose "movement history service" in that regard too
16:52mstenta[m]which the location service uses
16:52symbioquine[m]yeah
16:54mstenta[m](the log query service is a little more specific than just a service for loading logs... it is sort of specific to farmOS's model of "finding latest log that references an asset at a particular time")
16:54mstenta[m]this is what it looks like to "find the latest movement log":
16:55*sent a long message: < matrix.org/_matrix/media/r0/download/mat >
16:55mstenta[m](the `$options` array is just a helper that gets parsed by `getQuery()` to add standard conditions)
16:55mstenta[m]similar to `farm_log_query()` in 1.x
19:12mstenta[m]Huzzah! My asset location tests are passing :-)
19:12mstenta[m](still more to do... but it's working!)
20:43*_margoaron has quit (Ping timeout: 265 seconds)
21:05*margoaron has joined
21:36*cpm has quit (Quit: Leaving)

< 192020-12-20⋏21 >