D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-14 Thread David Redondo
davidre created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
davidre requested review of this revision.

REVISION SUMMARY
  Makes it clear why the current build is failing instead of the develoepr 
wasting
  time investigating other causes. The message is styled similiar to the CMake
  error when it can't find a source file.

REPOSITORY
  R249 KI18n

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-14 Thread David Redondo
davidre edited the test plan for this revision.
davidre added reviewers: Framework: Syntax Highlighting, Localization, Build 
System.

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-14 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> KF5I18nMacros.cmake.in:52
> foreach (_current_FILE ${ARGN})
> -
> +  if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/${_current_FILE})
> + message(SEND_ERROR

This assumes a relative path given. It might make sense to also deal with 
absolute path, and only append CMAKE_CURRENT_LIST_DIR if not absolute, then 
check for existance?

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-14 Thread David Redondo
davidre edited the summary of this revision.

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-16 Thread Christoph Cullmann
cullmann added inline comments.

INLINE COMMENTS

> kossebau wrote in KF5I18nMacros.cmake.in:52
> This assumes a relative path given. It might make sense to also deal with 
> absolute path, and only append CMAKE_CURRENT_LIST_DIR if not absolute, then 
> check for existance?

Some lines below we anyways do

get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)

Could we not just use the result of this for both the check + output?

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre updated this revision to Diff 73788.
davidre added a comment.


  So much easier, thanks Christoph

REPOSITORY
  R249 KI18n

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26670?vs=73564&id=73788

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre marked 2 inline comments as done.

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre updated this revision to Diff 73790.
davidre added a comment.


  Remove debug message

REPOSITORY
  R249 KI18n

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26670?vs=73788&id=73790

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre updated this revision to Diff 73791.
davidre added a comment.


  Don't change whitespace

REPOSITORY
  R249 KI18n

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26670?vs=73790&id=73791

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre added a comment.


  Output of
  
cmake_minimum_required(VERSION 2.8.12)
find_package(ECM)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
find_package(Qt5Widgets)
find_package(KF5I18n)
ki18n_wrap_ui(var test.ui)
ki18n_wrap_ui(var test.uia)
ki18n_wrap_ui(${CMAKE_CURRENT_SOURCE_DIR}/test.ui)
ki18n_wrap_ui(/not/existing/path)
  
  with existing test.ui next to CMakeLists.txt:
  
[...]
CMake Error at 
/home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:55 
(message):
   Cannot find ui file:
   
  test.ui

Call Stack (most recent call first):
  CMakeLists.txt:7 (ki18n_wrap_ui)


CMake Error at 
/home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:55 
(message):
   Cannot find ui file:
   
  test.uia

Call Stack (most recent call first):
  CMakeLists.txt:8 (ki18n_wrap_ui)


-- Configuring incomplete, errors occurred!
See also "/tmp/test/build/CMakeFiles/CMakeOutput.log".

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre planned changes to this revision.
davidre added a comment.


  Doesn't seem right taking a closer look

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre added a comment.


  Well it seems I forgot to create the test.ui file... 
  F731: CMakeLists.txt 
  Output:
  
CMake Error at 
/home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:56 
(message):
   Cannot find ui file:
   
  test.uia

Call Stack (most recent call first):
  CMakeLists.txt:7 (ki18n_wrap_ui)


CMake Error at 
/home/david/kde/lib/x86_64-linux-gnu/cmake/KF5I18n/KF5I18nMacros.cmake:56 
(message):
   Cannot find ui file:
   
  /not/existing/path

Call Stack (most recent call first):
  CMakeLists.txt:9 (ki18n_wrap_ui)


-- Configuring incomplete, errors occurred!
See also "/tmp/test/build/CMakeFiles/CMakeOutput.log".

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-17 Thread David Redondo
davidre updated this revision to Diff 73793.
davidre added a comment.


  arc diff so pending changes is reset

REPOSITORY
  R249 KI18n

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26670?vs=73791&id=73793

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre, #framework_syntax_highlighting, #localization, #build_system
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-22 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.
This revision is now accepted and ready to land.


  I think this ok the way it is now, or?

REPOSITORY
  R249 KI18n

BRANCH
  error (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26670

To: davidre, #framework_syntax_highlighting, #localization, #build_system, 
cullmann
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns


D26670: ki18n_wrap_ui: error when file doesn't exist

2020-01-23 Thread David Redondo
This revision was automatically updated to reflect the committed changes.
Closed by commit R249:f56f3b211cf9: ki18n_wrap_ui: error when file doesn't 
exist (authored by davidre).

REPOSITORY
  R249 KI18n

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26670?vs=73793&id=74196

REVISION DETAIL
  https://phabricator.kde.org/D26670

AFFECTED FILES
  cmake/KF5I18nMacros.cmake.in

To: davidre, #framework_syntax_highlighting, #localization, #build_system, 
cullmann
Cc: cullmann, ngraham, kossebau, kde-frameworks-devel, LeGast00n, GB_2, 
michaelh, bruns