Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
KDevelop
KDevelop
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 28
    • Merge Requests 28
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • KDevelop
  • KDevelopKDevelop
  • Merge Requests
  • !8

Closed
Opened Feb 16, 2019 by Aaron Andersen@aandersen
  • Report abuse
Report abuse

Fix crash on NixOS for the kdev-php plugin

  • Overview 26
  • Commits 1
  • Pipelines 14
  • Changes 2

Issue: When running the kdev-php plugin on NixOS kdevelop instantly crashes with this error:

importing internalFunctions failed "/run/current-system/sw/share/kdevphpsupport/phpunitdeclarations.php"

This file is supposed to be an internal file and parsed even though it is larger than the 5MB limit, but it is not considered an internal file on NixOS because...

On NixOS:

  • /run/current-system/sw/share/kdevphpsupport/phpunitdeclarations.php is a symlink to /nix/store/some-long-hash-kdev-php-5.3.1/share/kdevsupport/phpunitdeclarations.php
  • (one of) the value(s) for QStandardPaths::standardLocations(QStandardPaths::StandardLocation::GenericDataLocation) is /run/current-system/sw/share/

The original check if (internalFilePath.startsWith(dataPath.canonicalPath() + QStringLiteral("/kdev"))) { will resolve symlinks and then the comparison will not pass. NixOS requires a version of this check which does not resolve symlinks, and this merge request implements that.

I have tested these changes on my NixOS system and with the changes kdevelop no longer crashes when running the kdev-php plugin.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: kdevelop/kdevelop!8
Source branch: master